Or, at least, not by itself, it did not.
The financial crisis consisted of two things:
1. A liquidity crunch or bank run, in which financial institutions all wanted to sell their long-term assets in order to pay off short-term liabilities at the same time, but couldn't.
2. A solvency crisis, in which so many systemically important financial institutions had made bad bets that their simultaneous failure threatened the health of the financial sector itself.
Both of these things involved risky mortgage lending. But risky mortgage lending, by itself, was not sufficient to cause either one of these. That's why I say that risky mortgage lending didn't cause the crisis.
Why not? Because in an efficient financial market, risk is fine. Risk is OK. In an efficient financial market, risk is priced. In an efficient financial market, if I buy a risky asset from you, I pay you less money because of the fact that I agree to take on more risk. (Paying less money up front means a higher expected return. So higher returns are my compensation for taking on more risk.)
What happened in the financial crisis was that risk was mispriced. People underestimated the risk of mortgages, mortgage-backed bonds, derivatives of mortgage-backed bonds (CDOs), insurance on mortgage backed bonds (CDS), commercial paper of banks that owned a bunch of mortgage-backed bonds, repurchase agreements with banks that owned a bunch of mortgage-backed bonds etc. Because they underestimated the risk of these things, they paid too much for them. This caused crisis (2), the solvency crisis, which hobbled our banks for years. And realization of crisis (2) caused crisis (1).
If there had been less risky lending, would people have underestimated these risks as much as they did? Maybe, maybe not. But whether or not they would have, we know that if the financial system had worked like it should, then there would not have been such a systematic underpricing of risk.
So risky mortgage lending didn't cause the crisis. What (partially) caused the crisis was risky mortgage lending being mistaken for non-risky mortgage lending, by people who ought to have known better.
Which brings me to the Community Reinvestment Act. Via Tyler Cowen, here is an NBER working paper that shows that the CRA made banks take on riskier portfolios of mortgage loans than they otherwise would have.
Does this mean that the CRA contributed to the financial crisis? No. Because the CRA existed since 1977, and the U.S. housing bubble only began in the 2000s. If three decades was not enough for the financial market to figure out that CRA mortgages are riskier than other mortgages, then the market is grossly inefficient, and crises will tend to form even with no CRA. And if in those three decades the market did figure out that CRA mortgages were riskier, then the CRA risk described in the paper was properly priced into all the MBS, CDOs, CDS, asset-backed commercial paper, etc.
In other words, the CRA made have caused more risky mortgages to be born, but the banks should have known that and hedged their bets accordingly. Either they did, and the root cause of the financial crisis was the mispricing of non-CRA risks (I suspect this is the case), or else they didn't, and thus the financial system was broken for a long, long time.
Either way, we shouldn't blame the CRA.
Update: Yes, I know there are reasons to doubt this study, and to think that the CRA didn't even cause much of the increase in risky lending. But the point of this post is: Even if it did, that doesn't mean it contributed to the financial crisis!