There are many ways to look at this and the answer that one chooses depends to a great deal on one's political orientation.
For conservatives, the answer is that government should be less involved in the markets. A conservative would argue that much of the sub-prime lending was caused by government intervention. The government distorted the market through such institutions as Fannie Mae which made it more possible for people with poor credit to get loans.
Some conservatives might also look at the need for more safeguards within the banking business (but not imposed by the government). They would argue that the lending industry needs to be more transparent about the kinds of loans that it is making and the kinds of securities it is selling. This would make it easier for investors to know exactly what they are buying. They would also say that bankers need to do much more in the way of managing risk so that they do not get into such deep trouble.
By contrast, liberals would favor a regulatory approach. They would want to do things like giving regulators the power to "pop" bubbles that are occuring like that in the housing market. They would like to have more regulation of the derivatives market so that it would be harder to issue the sorts of complex financial products that helped to cause the crisis.
There is no consensus on this question, then. Conservatives call for less government regulation and liberals call for more.