I've been wondering this for a while but I have not yet encountered an explanation.
This is from my understanding of physics, which is by no means expert, so sorry for my crude explanation:
Energy within earth can be considered a closed system; it transforms but cannot be created or destroyed — and from what I understand, heat seems to be its most natural form, so it will always end up like that in some way.
Two things affect the total sum of energy on earth: radiation into space will drain energy (and is limited because of the presence of atmosphere). Radiation from the sun adds energy to the system.
Basically the sun is our only real source of energy (and we can consider it limitless, since when the sun is exhausted, we're over anyway).
The way I understand it, solar panels increase the efficiency of how we 'harvest' this solar energy, reflecting less of it back into space, and turning more of it into en energy (in this case, electrical). So we take more energy from the sun by putting solar panels in place. But the amount of energy that is removed from the system stays the same.
Hence the total sum of energy on earth increases (more) when we use solar panels. So how come we consider them to be a way to counter global warming, instead of a contributing factor?
edit: since all answers are about comparing solar cells to fossil fuels, let me clarify a bit more.
I understand that fossil fuels will contribute more to climate change than solar cells — but I just wanted to clarify that is seems to me that both are a net negative (not if you replace one by the other). In other words, that the idea that solar cells are 100% clean (apart from production cost), is not really true, then. Wind of hydro however, would be, since they use energy that is already present in the earth system. (and of course what we really need to do is require less energy)
Best Answer
The purpose of solar cells is to generate electricity. This can replace the electricity generated by burning fossil fuels for electricity. The fact that it's becoming practical to run vehicles on electricity means we can also replace the fossil fuels burned to power vehicles, which makes things even better.
But let's concentrated on generating electricity. Your analysis ignores two things, one minor and one absolutely crucial:
This post on RealClimate does an excellent job of going through the details. To take an unrealistic extreme case, they assume that solar cells are perfectly black (albedo = 0), and they ignore the fact that real solar cells are sometimes installed on already dark surfaces (such as roofs). In order to generate the current world electricity supply of 2 trillion watts, perfectly black solar cells would add about 6.7 trillion watts due to waste heat. As they point out, the efficiency of fossil fuel plants means 2 trillion watts of electrical power would be accompanied by about 6 trillion watts of waste heat.
So if you replace fossil fuel power plants with solar-cell power plants, you don't really change the waste heat production.
But you do change the CO2 production, and that's crucial, because the heat added to the atmosphere by adding CO2 is orders of magnitude larger than the waste heat from the power-generation process itself. (This is a continuing process: every second you run the fossil-fuel power plants, you add more CO2 to the atmosphere.)
(You can, if you like, argue that getting rid of electricity generation entirely -- closing all power plants, solar or fossil-fuel-powered -- would be marginally better than converting electricity generation to solar. But that's a very small difference, and not really an option if you want to continue to have some kind of human civilization on the planet.)