Solar activity and climate change
The Sun provides planet Earth with energy that defines our climate and makes life possible. The total energy received from the Sun–often referred to as the Total Solar Irradiance (TSI)–is not constant in dynamic stars such as our Sun. It now acknowledged that the solar brightness, and hence TSI, varies over time. It is also found that the brightness of other stars vary.
Despite the presence of more dark spots ('sunspots') on the solar surface during high activity, the TSI increases due to more bright networks and solar surface features known as faculae. The number of sunspots represents one of several manifestations of the changes in the sun. High solar activity is also associated with emission of electromagnetic radiation in the radio wave frequency band (wavelength of 10.7 centimeters), as well as more pronounced changes in the ultra-violet light than in the visible spectrum.
The variations in TSI have a clear resemblance with the 11-year sunspot cycle (known as 'the Schwabe cycle' after the discoverer of the ~11-year periodicity in the 19th Century), but it is also postulated that the TSI varies on longer time scales. Variations in the TSI have indeed been estimated for the past based on the sunspot data or information from various isotopes. Such predictions for the past are often referred to as 'reconstructions'.
The sunspots arise when the sun's magnetic field lines cluster together intensifying the magnetic field intensity over localized regions in the Sun, and a high number is an indication of the presence of magnetic fields. The enhanced magnetic intensity then inhibits movement near the solar surface, and hence 'arrests' convective movement that otherwise is responsible for bringing the energy created in the solar nucleus to the solar surface (after it has passed the radiation zone). The sunspots can take the form of different structures, the umbra (darkest parts) and penumbra (lighter stranded regions). They also tend to form groups which are linked through related magnetic field lines. The solar wind, which is solar mass ejected into space, bring the magnetic field lines out, and thus affect the magnetic environment in large parts of the solar system.
The idea that the sunspots may affect the weather or climate here on Earth has been nurtured for several centuries. Galileo has been given the credit for establishing the existence of sunspots after the invention of the telescope in 1611 (before then, they were mistaken for being the passing of the inner planets). The hypothesis of links between sunspots (solar activity) and temperature, pressure, or rainfall on Earth were popular especially during the 19th century, and a number of claims were made, based on empirical and statistical studies. None of these, however, have withstood the test of time. The support for sunspots and weather/climate waned after the 1950s, probably as a result in meteorological advances through the frontal theory and numerical modeling.
Currently TSI is monitored using a Total Irradiance Monitoring Instrument (TIM). TSI is known to be linked to Earth climate and temperature. Proxies of the TSI based on sunspot observations, tree ring records, ice cores, and cosmogenic isotopes provide estimates of the solar influence on the Earth's climate that extend back thousands of years, and correlate with climatic events on the Earth.
The idea that solar activity affects our climate has since become more popular, perhaps partly due to a paper published by two Danish researcher in Science 1991 (this paper is still controversial), and it is now proposed that changes in the sun may affect our climate in three different ways: (i) through changes in the TSI, as discussed above, (ii) by increased absorption of UV-light in the stratosphere (because there is more UV-light), and (iii) through galactic cosmic rays (GCRs). The former mechanism is well accepted within the science community, but the changes in the TSI are considered to be too small to produce large variations in the global mean temperature. Changes in the TSI cannot explain the present global warming. The various TSI data sets are in basic agreement indicating that variations of TSI track the passage of sunspots across the sun yeilding a net change of about 0.2%, and that long-term solar cycle variations are only on the order of 0.1%. 
The second mechanism is physically plausible, but the lack of sufficient data has until now hampered a thorough verification of this mechanism. The stratospheric absorption on UV will affect the spatial temperature structures and thus influence the atmospheric circulation though the way waves in the atmosphere propagate.
Mechanism iii is he most controversial of these, and it assumes that cosmic rays are able to enhance the creation of cloud condensation nuclei (CCN) and hence affect the low level cloudiness. The idea of enhancing condensation of droplets resembles the principle behind an instrument called cloud chambers (but the water vapor pressure is much higher in the latter). The cosmic rays are modulated by the solar magnetic fields which also follow the 11-year solar cycle. Thus, the solar cycle will, according to the hypothesis, affect the clouds indirectly though the modulation of GCRs and hence the extent of low cloudiness. Low clouds are postulated to have a cooling effect on the Earth's surface, and more clouds is supposed to reduce the global mean temperature.
It is important to distinguish betweeen the question (a) whether GCRs do in fact affect the low-level cloudiness and (b) whether GCR may have played a role in the recent climate change. The latter requires the former to be true, but b does not necessarily follow a.
There are conflicting accounts as to whether GCR affect cloudiness. One study of real cloudiness by Harrison & Stephenson found a weak, albeit statistically significant, relationship between diffuse light (taken as an indicator for cloudiness) measured in one location and GCR, while Sloan et al. did not find any support for such a link. A cloud experiment was conducted in Copenhagen (SKY), published in the Royal Met. Soc. (A critical comment on this study has been posted on RealClimate.org).
Even if it were true that GCRs do affect the cloudiness, the past 50 years of modern instrumental data do not indicate any clear long-term change in the level of cosmic ray flux (apart from the 11-year cycle) that can explain the current global warming (see Figure 2 and Lockwood & Frohlich; the lack of trend in the GCR and other solar indices was also noted in Benestad 2005). Several different indeces–also referred to as 'solar proxies' (red, cyan, grey)–exhibit the solar variability, but none of these indicate any systematic change that resemble that of the global warming (dark blue). Also shown is the CO2 (green; the logarithm of the CO2 concentration in parts per million in volume), which is the only forcing that we know of that can explain the current temperature rise.
There are no strong proof of similar changes in the low cloud extent either (not mentioned in the IPCC 2007, assessment report from Working Group 1 - the physical sciences). Furthermore, any mechanism by which changes in the temperature is influenced by changes in the albedo (the ability to reflect off sunlight) is expected to have strongest effect on the dayside (where there is sunlight) and near the surface (where the sunlight is absorbed). The temperature trends indicate stronger warming at nighttime, which requires a more complicated response than just pure absorption.
In addition, observations do not indicate any warming of the stratosphere which would be expected for increased levels of solar activity and UV absorption, but the picture is more complicated due to unrelated anthropogenic changes in the stratospheric ozone concentrations (the 'ozone hole').
It may also be argued that a with a hypothetical GCR-cloud-based mechanism for influencing the temperature, one would expect to see higher correlations at the surface and lower higher up, but it is in principle difficult to resolve which part of the variations come from e.g. GCR and which from stratospheric absorption of UV, as these are correlated.