One of the most important factors that generate prosperity is rule of law, which means having an objective set of laws that apply to everyone. Rule of law provides the incentive for people to engage in productive activity so they can prosper themselves by producing value for others.
In the absence of rule of law, institutions favor some people over others, and entrepreneurial individuals have the incentive to look for ways to join the favored group and to benefit themselves through activities that impose costs on others. Rule of law removes the opportunity to prosper through connections and cronyism and creates opportunities to prosper through mutually-advantageous exchange.
A legal system designed to protect individual rights will rest heavily on restitution for victims who have had their rights violated. This is explained well by Bruce Benson and Murray Rothbard, among others. Justice is served when people who have had their rights violated receive restitution as compensation for the harm they suffered.