There is little evidence to support this idea. Trends in global warming in the recent past have been in the opposite direction to that predicted by the idea that cosmic rays cause climate change. More ….
 
Cosmic rays are fast moving particles that arrive from space, partly from the Sun, and release electric charge in the Earth’s atmosphere. Laboratory experiments hint that cosmic rays could play a role in the development of tiny particles that could help clouds to form. If, and this is uncertain, the same chain of processes occurs in the atmosphere it might lead to more clouds; clouds can have a cooling effect because they reflect the Sun’s heat back into space. When the Sun is more active its magnetic field is stronger and acts to deflect more cosmic rays away from the Earth. So the argument goes that a more active Sun would lead to fewer cosmic rays reaching the atmosphere, therefore fewer clouds and hence a warmer Earth. Observations have shown that, at most, the above chain of processes produces only a small effect. Even if the effect were greater, the Sun’s activity has changed so little over the last few tens of years that it could not explain the observed rises in global surface temperature over the same period. Indeed, since the late 1980s, trends in cosmic ray intensity have been in the opposite direction to that required to explain global warming.