See also: correlation between sea level rise and solar activity
The picture above shows the number of sunspots in the past. Note that there is a natural 11-year-long cycle and this basic solar variation cycle is modulated by a signal whose timescale is comparable to 400 years. Note the Maunder minimum - click the picture to learn more about it - during 1650-1700. It happens to kind of agree with the coldest years of the Little Ice Age. Also, the number of sunspots in recent years reached the 1000-year high.
Commercial: Nigel Worthington's notes on climate change (click)Click the picture below to zoom it in.
At longer, geological timescales, there seems to be a rather impressive inverse correlation between the number of cosmic rays and the temperature. The more cosmic rays, the more clouds they help to create, and the cooler temperatures you get. Lower clouds have a cooling effect while high clouds have a warming effect.
Click the figure below - from a paper by Shaviv and Veizer - to get much more information about it from Nir Shaviv's website.
The graph above shows a period of 140 million years or so. In fact, all kinds of geophysical and astronomical records indicate that the period was around 140 million years and the coldest moment of the cycle appeared in 70% of each cycle. This fact, captured by the picture below, shows that the cosmic-climate link is rather robust:
A paper by Svensmark and Friis-Christensen - click the graph below to see the full article in PDF - shows a close correlation between the cloud cover (thick line in the middle of the range) and cosmic ray flux in Climax, Colorado (thin line):
The thick line doesn't continue to the present and you may ask whether the agreement continued to hold. Here is the updated graph of the same correlation from Shaviv 2005:
It is useful to know that a lot of changes have been taking place in the Sun. For example, the Sun's coronal magnetic field has doubled in the last 100 years, see e.g. Lockwood et al.
Video 1: Defending the sun-climate link. Original video's music by Rammstein (Die Sonne). Clip by iloveemo1984. The video was removed from YouTube, officially because of Wag TV copyrights. The company however denies such a request, indicating that it was removed because of the pressure from the global warming sect.
Also, in 1991, Friis-Christensen and Lassen have found a remarkable inverse correlation between the length of the 11-year solar cycle and temperature. See the graph below. Click it to get to their paper in Science.
The shorter the cycle whose average length is about 11 years is, the more magnetically active the Sun is expected to be. A lecture about solar effects on the climate includes the graph above.
You may also want to read about recent experiments meant to directly measure the ability of cosmic rays to influence cloud formation: CLOUD experiment at CERN (with some linked papers about the cosmic connections with the climate), SKY experiment in Denmark. It's not the first time when the link between clouds and cosmic rays is supported by experimental evidence: see a German experiment from 2002.
The magnetic field of the Sun - that becomes stronger when there are many sunspots - is probably screening the Solar System from cosmic rays. More sunspots means less cosmic rays which means less clouds which means warmer temperatures. This basic paradigm was promoted in Martin Durkin's 2007 documentary, The Great Global Warming Swindle.
You may also want to click the "heliophysics" sticker to see many more articles related to physics of the Sun - many of them are about the climate. There are two replies to a recent anti-cosmic article by Lockwood and Fröhlich, written by Svensmark and Friis-Christensen and by Nir Shaviv, respectively.
Additional well-known climate articles on The Reference Frame