I think a good law will create wealth if it enables a mutually beneficial transaction that would not otherwise be possible.
For example, a law against breach of contract makes you more likely to hire someone you don't know well. That person gets a job, you get an employee, so you're both better off. As long as this benefit is greater than the cost of enforcing the law, that law has created wealth.
I recommend Law's Order by David Friedman for a whole lot more on this subject. It's a fascinating introduction to the application of economics to law.