The article is less than clear on this, but the contention is NOT that the sun causes cosmic rays, but that changes in the sun's magnetic field modulate the influx of cosmic rays into the solar system, of which the earth is part.
Going back to the 1700's, William Herschel showed a strong correlation between wheat prices in London and sunspot numbers. Herschel (correctly) used wheat prices as a surrogate for temperature and deduced that sunspot number correlates with global temperatures. (Although he was far more modest in his correct claims than Al Gore is with his nonsense.)
At times in the year the sky over Arizona looks like the inside of a cloud chamber. You can see the cascade of particles as the cosmic rays slam into the atmosphere.