Why does California grow food instead of building solar panels?
Economically speaking.
I put together an estimate here of extremely conservative estimates of income and fairly generous estimates of costs. For instance, I've assumed the market value of electricity is $0.04 per kWh, which is less than the cost of producing electricity with coal. I've assumed that the effective sun hours are a flat 5/day for CA, rather than the 6.5 hours we actually get over most of the state. And I've assumed that only half of a given footprint can be actual panels instead of access, structure, and support.
I've assumed a 30 year lifespan and I've included a generous 1.5% decline in production per year.
And still, an acre of solar panels produces $21,000 a year. Including installation costs, that's still $3,200 per acre of profit, with no subsidies or anything. As far as I can tell, farms for staples are happy with a few hundred dollars per acre, maybe something on the odds of $2000 for specialty crops.
For a small family farm on a mere 200 acres, they get $656,000 for watching the sun shine and they never need to pull a weed in their life.
Note that this is the worst-case. With accurate numbers, including a $0.05/kWh pricing, it's a net $33,000 per acre (that's not income, that's profit), and a small farm gets $6.7 Million a year!
Maybe they aren't going to switch the whole farm over at once, but if you can get a loan to put up even a small area of solar panels, do it! Every yard of solar panels pays better than a yard of beets, corn, soybeans, or almonds.
I mean, we're all going to starve at this rate, but aside from that, there's no reason to grow food...
Worst-case scenario, it takes 25 years for the panels to pay themselves off; more reasonable estimates would say 15 years. However, in either case, it's not like you just dumped a pile of cash down; the money would come from a loan that gets paid off as the sun shines.
EDIT: For fun, I used optimistic numbers, like current $.12/kWh prices and slightly lower decay rates on the panels. And I moved it to the Mojave and crammed the panels closer together. All in all, this 'ideal' situation paid off in less than 6 years and produces $182,000 a year per acre.