Strictly speaking, liberty isn't the solution to problems. It's what creates the framework in which solutions can be discovered. That is an important distinction because it reminds us that advocates of full-blown liberty do not offer the world a problem-free society but "only" a society in which problems are discovered and problem-solvers are mobilized as quickly, fairly, and efficiently as impossible.
To get this point across to students in lectures, I used to quote the the title of a 1970 hit record: "I beg your pardon, I never promised you a rose garden." Social troubles will not disappear with the emergence of full freedom, but the chances of spotting and addressing them will be maximized in the most just way. That's the best we can hope for in a world of scarcity and uncertainty. On the other hand, that's not too shabby, is it?
What makes this happen? The answer can be captured in a single word: incentives. In a free society people are rewarded--they profit--by spotting and solving problems or correcting errors, before others have done so. Self-interest is further aligned with the interest of others.
This aspect of social life has been developed for many decades by the most important economists, among whom I would spotlight those of the Austrian school. In the 20th century they include Ludwig von Mises, F. A. Hayek, Israel Kirzner, and Murray Rothbard, followed by a couple of later generations of social scientists who continue to work in this tradition.
If the incentive system is to work, people need to be free to offer solutions. The scientist Joseph Priestley (1733–1804), in writing about education, wrote that to discover the best methods, we need an environment characterized by "unbounded liberty, and even caprice." As Priestley also put it, "Now, of all arts, those stand the fairest chance of being brought to perfection, in which there is opportunity of making the most experiments and trials." (I wrote about Priestley's radical advocacy of freedom in education in Freedom and School Choice in American Education.)
The logic behind Priestley's idea isn't complicated. We don't always know if a method of accomplishing something will work--however good it may look on paper. It has to be tried. Since that's the case, we need a highly decentralized environment in which ideas can be tested. (I don't like the word system for what I have in mind because that suggests an overall design rather than what Hayek called "spontaneous order.") In a centralized system, trial and error would be dicey since the inevitable mistakes would be committed on a large scale, with little chance for individuals to opt out. But in a decentralized environment, mistakes are necessarily contained, readily observed by others, and then corrected by those who offer a different product or service.
Government agents face different incentives since government usually is the only game in town. In fact, they face perverse incentives: politicians and bureaucrats may prosper by the existence and even the exacerbation of problems. If an agency is failing, the solution most often is to appropriate more money! And since government centralizes approaches to problems, mistakes are committed on a large scale, especially when they are undertaken at the national level. Federalism can reduce the scale of error, but not nearly as much as the free market can because state and local governments lack other features of the marketplace.
This point turns the spotlight on another aspect of a free society: competition. Competition is what happens with one person thinks he or she has a better way of doing something than someone else does. The way to find out is to offer it to the public. This shows that competition and cooperation are two sides of the same coin, not opposites. But if the government erects obstacles to upstart competitors, the it throttles the process, and better ways of addressing problems are left on the shelf, if undiscovered at all.
Hayek called competition a "discovery procedure," which gets at a crucial point. I call competition the "universal solvent." We can find a similar idea in John Stuart Mill's On Liberty, in which he extols the truth-discovering value of the radically free exchange of ideas. (My favorite line from that book: "He who knows only his own side of the case, knows little of that.")
Freedom and competition make possible discoveries that would not have been found otherwise precisely because it is only in that environment--the market order--that people encounter circumstances and alternatives with respect to which they will demonstrate in action their true preferences--preferences they might not have expected to demonstrate. This is part of what is meant by "spontaneous order." For this reason, government planners cannot hope to simulate market outcomes. The planners are barred from ever knowing what would have happened if people were left free. As James Buchanan pointed out:
I want to argue that the “order” of the market emerges only from the process of voluntary exchange among the participating individuals. The “order” is, itself, defined as the outcome of the process that generates it. The “it,” the allocation-distribution result, does not, and cannot, exist independently of the trading process. Absent this process, there is and can be no order.”
...Individuals do not act so as to maximize utilities described in independently-existing functions. They confront genuine choices, and the sequence of decisions taken may be conceptualized, ex post (after the choices), in terms of “as if” functions that are maximized. But these “as if” functions are, themselves, generated in the choosing process, not separately from such process. If viewed in this perspective, there is no means by which even the most idealized omniscient designer could duplicate the results of voluntary interchange. The potential participants do not know until they enter the process what their own choices will be. From this it follows that it is logically impossible for an omniscient designer to know, unless, of course, we are to preclude individual freedom of will.
Much more could be and has been said on this subject, but the upshot is this: the best way to expose and correct problems and errors is to leave people free.