Solar panels are good for global warming because they cause less (much less) surface heating than harvesting equivalent energy due to burning fossil fuels does.
An oversimplified model
To see why this is consider a (very much oversimplified!) model of what the temperature of the surface should be. In this model we'll just consider incoming sunlight and I will assume that all of this makes it to the surface (this is wrong, but good enough).
Two things happen at the surface:
- some proportion of the sunlight is reflected and (by the same assumption as above) goes straight back out to space;
- some proportion is absorbed, and causes the surface to get hot.
Because the surface is hot, it now radiates as a (or as an approximate) black body, and most of this radiation is in the infrared (if it's not, then you probably are not interested in living on this planet, as its surface is visibly glowing).
Unfortunately the atmosphere is not transparent to infrared, so some of the outgoing radiation from the surface gets absorbed in the atmosphere and then reradiated, and some of this reradiation comes back down to the surface. This process is fairly complicated because you need to know what wavelengths the atmosphere is not transparent to, and then solve a bunch of hairy radiative-transfer equations, not to mention dealing with clouds, convection, wind &c &c &c.
But there's a simple, and obvious, physicist's answer: the end result of this process around infrared (what a climate scientist would call 'longwave') in the atmosphere is that the surface ends up a little warmer than you would expect if there were no atmosphere.
(Note I have completely ignored the IR component of the incoming radiation from the Sun, which a proper model should not do.)
So, OK, now we'll consider two adjustments to this model: solar panels, and burning fossil fuels.
Solar panels
Solar panels capture some of the visible / UV light from the Sun, and turn it into infrared (via running machines &c and ultimately heating). It's not completely obvious whether solar panels lower or raise the proportion of incoming sunlight which is reflected directly (do they have higher or lower albedo than the surface they covered in other words) but lets assume they lower it, so their net result is to lower the albedo of the surface and to increase the amount of infrared being radiated. This then increases the surface temperature slightly.
Fossil fuels
These do nothing to the albedo, (actually, they do: they lower it due to soot, but they also dump soot into the atmosphere which makes it less transparent to visible light and this is all a complicated process which we will ignore but which matters a lot in fact). They create two things:
- approximately the same amount of infrared as solar panels for the same amount of energy, which slightly heats the surface (this heating comes from energy previously trapped in the fossil fuels, and captured there long ago from the Sun);
- $\mathrm{CO_2}$, in large quantities.
Unfortunately $\mathrm{CO_2}$ is one of the components of the atmosphere which absorbs and reradiates infrared, and so this emission of $\mathrm{CO_2}$ increases the surface temperature by the process roughly described above.
Which causes more surface heating?
To know which of these causes more heating you have to actually model the system in some reasonable detail (and it's just because these models end up as rather complicated that allows denialists a way in). But one way in is to compare the amount of energy coming from the Sun (and being radiated back) and the energy humans generate.
The solar constant, which is the flux of power from the Sun crossing the Earth's orbit is about $1360\,\mathrm{W/m^2}$, and this means that the amount of power the Sun delivers to the Earth at the top of the atmosphere is about $1.7\times 10^{17}\,\mathrm{W}$. Human power generation in 2013 was about $1.8\times 10^{13}\,\mathrm{W}$.
This means that the energy flux from the Sun is about $10^4$ times bigger than human power generation: even a relatively tiny change in how much of this contributes to surface heating will completely dwarf any heating due to human power generation. Another way of thinking about this is that all human power generation is about $0.04\,\mathrm{W/m^2}$. The imbalances in solar flux due to changes in greenhouse gasses are of the order of $1\,\mathrm{W/m^2}$: far more.
The simple-minded blackbody model
Another way of seeing this is to consider a mindless blackbody model: assume there is no atmosphere and that the Earth is a perfect blackbody being illuminated by the Sun: what would its temperature be. Well a little thought shows you that it would sit at a temperature of
$$T_S = \left(\frac{F}{4\sigma}\right)^\frac{1}{4}$$
Where $F$ is the incoming solar flux, and $\sigma$ is the Stefan-Boltzmann constant. And this turns out to be $278\,\mathrm{K}$, or about $5\,\mathrm{C}$. This is colder than it really is on average but it's a decent first estimate.
So now, let's do it for human power generation. The formula here is
$$T_H = \left(\frac{H}{4\pi R^2\sigma}\right)^\frac{1}{4}$$
Where $H$ is human power generation and $R$ is the radius of the Earth.
And this is about $28\,\mathrm{K}$. And remember energy flux goes as the fourth power of temperature ($\sigma T^4$): human power generation is not anywhere near warming the planet significantly. You can easily see this by considering the difference between a planet warmed entirely by the Sun and one where human power generation is added:
$$
\begin{align}
\Delta T &= \left(\frac{F}{4\sigma}
+ \frac{H}{4\pi R^2\sigma}\right)^\frac{1}{4}
- \left(\frac{F}{4\sigma}\right)^\frac{1}{4}\\
&\approx 0.007\,\mathrm{K}
\end{align}
$$
This is completely negligible.