Correlation of global temperature with solar activity
The solar output is very nearly constant, as shown in the plot below. The range of variation is about 0.2%, so reproducible that it is often referred to as the "solar constant".
But there are other aspects of the Sun's activity that are not constant, as indicated by the changing sunspot activity.
This illustration is a sketch of data from Durkin, based on data published by Friis-Christensen and Lassen. The end of the solar data has been altered in response to corrections of their data. This correlation between solar activity and temperature has been critiqued by Schneider and others, so it is an active area of investigation. The measured solar activity is well-correlated with the observed temperature variations, but does not follow the recent upturn in temperature as the originally published plot indicated.
While it appears that the measured solar cycle length tracks the temperature better than the CO2 concentration for the twentieth century up to 1970, this presented data remains quite controversial. When you look at the climate models that seek to show the human influence past 1970, you do see a good correlation of the temperature with the projected CO2 influence included, while the correlation with solar cycle length weakens.
The above illustration from Wikipedia shows some of the solar measurements as a function of time. The dominant fact from that illustration is that the overall solar output is incredibly constant -- varying only about one part in 1366! But the other variables are measured on a relative scale and represent much larger percentage variations, so it is possible that the solar flare index and the sunspot observations are windows to subtle influences on the Earth's climate that we don't understand.
Another solar activity correlation that is being investigated is that with cosmic radiation and its possible effect on cloud nucleation.
Collins, et al.
Friis-Christensen and Lassen