Monday's WSJ had a nice article on how stocks can be leading indicators during recessions. The basic idea is that in most past recessions, stocks tend to recover about 6 months before the end of the recession. The reason given is that prices rise as investor's forecasts of more robust growth begin to solidify. At the same time rising stock prices may have an wealth effect on households. Households will then consume more - which further drives the recovery.
However, in this recession, prices are being depressed by more than just lower cash flow growth. Bernanke told congress last week that prices no longer seem to reflect long term profitability, but rather "investor attitudes about risk and uncertainty, which right now are at very high levels".
It's worth remembering that there are two main inputs into stock values. The future cash flows generated by stocks and the riskiness of those cash flows as perceived by investors. While there is no doubt that the future cash flows are being hurt now (for the short run), further out these cash flows should be healthy as the economy expands again.
Investor attitudes to risk are embedded in the risk premium. Historically the risk premium has averaged around 6%, and in the long run this number appears supported by valuations. Towards the end of the tech bubble in the late 90's the risk premium (based on valuation models) was basically zero - consistent with a bubble market. But today I'd wager that the risk premium is 9 maybe 10%. A higher risk premium today means stocks are cheaper - if, and only if your personal view of the risk premium is less that of everyone else's.