Among critics of renewable energy, one key idea is that of Energy Returned On Energy Invested (EROEI). The central idea can be illustrated by the case of ethanol produced from corn in the US. It’s argued by critics that the production of ethanol from corn uses more fossil fuel inputs than it displaces. The US Department of Agriculture has an EROEI slightly greater than 1, but it’s still clear that corn ethanol is not going to do much to solve the carbon dioxide problem.
Now lets look at the case of solar PV. The energy-intensive component of a solar PV module is the polysilicon used to produce the wafer, which is produced using an electric furnace. Clearly, if more electricity is used in this process than is generated by cell, EROEI < 1, and the idea does not work. We can do a rough check by observing that a typical wafer uses 5 grams/watt of polysilicon. The cost of polysilicon is $20/kg. To be conservative let's assume this is all electricity, at a cost of 5c/Kwh. Then a quick calculation shows that each watt of PV requires 2 KWh of electricity in production or about 1 year's generation in a favorable location. So, for a panel with a 10-year lifetime, the EROEI is 10. Clearly not much of a problem. The estimate omits the energy costs of the rest of the module, but that's almost certainly more than offset by the conservative assumptions about polysilicon.
Some EROEI fans don't like this calculation. They want to include all sorts of other costs, going as far as the food energy used by the workers who instal the panel. At this point, the exercise becomes one of trying to price all economic activity in terms of energy, an idea that has been tried without success for decades. For everything except energy-intensive activities like smelting, energy costs are a small part of the total, and imputing such costs to any particular energy source is a fools errand.