As a taxpayer in California, I cannot track where most of my money goes. I can't ask my representative or either senator where it goes and get a straight answer. (Disclaimer: I still like Boxer.)
It's a little unfair to compare states, though. Texas, for instance, has lots of natural gas resources, oil production and refinement (especially along the gulf coast) among other things.
Take a look at these:
http://img.skitch.com/20090710-x3sceq4i2pq4hwaemawtd5afrd.re...
http://img.skitch.com/20090710-nsuaeu7ch7ayhci6fp5yemeb5x.re...
A lot of California land is reserved by the federal government. I think it's somewhere around 45%. In Texas, very little is reserved.
Put another way, California would not have a deficit right now if it received its fair share of federal taxes.
I think the real issue is differing cultural attitudes toward risk. Californians embrace it, which probably results from the selection bias of having a state where the largest population centers are all centered on an active fault-line. Texans do their best to avoid it.
When times are good, people who take risks flourish, because most risks turn out well. But when times are bad, they get hurt much worse than people who play it safe. That's almost by definition: "good times" are those when most risks pan out, while "bad times" are those when most risks fail miserably. It's not surprising that California is doing worse than Texas now - they took on far more risk during the boom years.
People have short memories. I remember that at the first Startup School, one venture capitalist summed up the history of business in four words: "Boom. Bust. Boom. Bust." I think that was probably the truest thing said at the whole event.