The sun is the main source of heat and light to the Earth’s surface, so it should be no surprise that small differences in the amount of energy arriving from the sun can affect the climate significantly. Changes in the amount of solar energy can come from changes either in the sun, or in the position of the Earth relative to the sun.
The most common source of variation in the energy emitted from the sun is sunspots. A sunspot is a less-bright area of the sun, caused by magnetic fields affecting heat distribution inside the sun. While it takes satellites to make precise measurements of sunspot size and intensity, they are observable with more basic tools and have been known to astronomers for at least 2000 years. Sunspots occur randomly, but the frequency of their random occurrence follows cyclical patterns. The most prevalent cycle is 11 years long, but cycles as long as 6000 years have been proposed by some researchers (though they have not yet been proven).
The position and angle of the Earth relative to the sun is constantly changing in multiple ways, all of which affect how much solar radiation reaches a given place on the surface. Day and night are nothing more than very short-term changes in exposure to the suns energy. However, on the time-scales that climate scientists are concerned with day and night are averaged out, as are summer and winter. More relevant to climate science is the 40,000 year cycle in which the angle between the Earth’s orbital plane and rotation axis varies by about 2 degrees. Several other cycles in the Earth’s orbit also occur over thousands of years and can change the climate, and are collectively referred to as Milankovitch cycles.