Earth is closest to the sun in 3 January (147.5 million km) and furthest from the sun in 4 July (152.5 million km), so this is not the cause of seasons.

Because the Earth is tilted on it axis as it orbits the sun, the distribution of solar radiation shifts north and south during the course of the year.

Northern Hemisphere summer: Earth is tilted toward the sun, and radiation is more direct.

Annual radiation budget for the atmosphere. The top panel shows the net amount of solar radiation after accounting for albedo. The middle panel shows the outgoing infrared radiation at the top of the atmosphere. The sum of these two panels is given in the bottom panel, which shows that on average, the tropics have a net gain of heat due to radiation and the polar regions have a net loss. The units in all panels is energy per area (Watts per square meter). Note that the average value over the entire Earth in the bottom panel is close to zero---there is nearly an equilibrium in the amount of heat received and emitted.