Temperature changes throughout the year are caused by the tilt of the Earth on its axis and its revolution around the sun that allows sunlight to strike more directly. Depending on which hemisphere is facing the sun at a given time, that hemisphere experiences either summer or winter.
The axis of Earth is tilted 23.5 degrees from the vertical, always in the same direction relative to the sun. This means that as the Earth revolves around the sun, different hemispheres face in opposite directions. For example, the Northern Hemisphere is pointed toward the sun from late March to late September. From the perspective of Earth, the sun appears to rise higher in the sky and sunlight is closer to striking the earth vertically. This means that any given area on Earth receives a more concentrated dose of sunlight, which heats the ground and air.
In the winter, the sun appears to rise lower in the sky and its rays don't strike that hemisphere as directly as they do in summer, making heat more diffuse. Spring and fall are intermediate, because both hemispheres get an equal share of sunlight.
From day to day throughout the seasons, temperature varies due to cloud cover, relative humidity and other atmospheric factors that affect the rate of sunlight striking Earth.