There have been numerous studies showing that the recent global warming has not been due to the Sun. As geophysicist Ray Pierrehumbert at RealClimate put it:
"That's a coffin with so many nails in it already that the hard part is finding a place to hammer in a new one."
Nevertheless, there is still a theory that the Sun has indirectly caused the recent warming by influencing galactic cosmic rays.
The crux of the theory (put forth by Henrik Svensmark) is that the Sun's magnetic field deflects galactic cosmic rays, which theoretically can seed clouds. Thus the stronger the Sun's magnetic field, the fewer cosmic rays reach the Earth, the fewer clouds form, and the less Sunlight is reflected by cloudcover (a.k.a. decreased Earth's albedo).
The theory has numerous fundamental flaws, but has not been 100% disproven (unlike the theory that the Sun is directly responsible for the recent global warming). However, a new study has put even more doubt in the likelihood of this theory.
"The idea is that variations in solar activity affect cosmic ray intensity.
But Lancaster University scientists found there has been no significant link between them in the last 20 years...the UK team explain that they used three different ways to search for a correlation, and found virtually none.
Over the course of one of the Sun's natural 11-year cycles, there was a weak correlation between cosmic ray intensity and cloud cover - but cosmic ray variability could at the very most explain only a quarter of the changes in cloudiness.
Dr Harrison's...research, looking at the UK only, has also suggested that cosmic rays make only a very weak contribution to cloud formation."
So anyway, I thought that was pretty interesting.