What is the distance from the Earth to the sun during the seasons and why does summer in the Northern Hemisphere occur when Earth is farthest from the Sun?
The distance from Earth to the sun and the seasons are two independent things, and they are not related to each other.
The distance varies from 147.1 millions kilometers in the beginning of January to 152.1 millions kilometers in the beginning of July. The exact dates change from year to year; for example: Jan-4 and Jul-6 in 2023, and Jan-2 and Jul-5 in 2024. This difference of distance is not enough to cause any perceptive change in the temperature.
What causes the seasons is the tilt of the Earth, probably caused by the hit of another body during the early stages of our planet. This makes the Southern Hemisphere to face the sun near the December solstice (with maximum around Dec-21), and the Norther Hemisphere, near the June solstice (with maximum around Jun-21). Therefore, in the summer, the radiation from the sun traverses a smaller amount of atmosphere, loosing less heat before reaching the surface.
In fact, the Earth is farthest from the sun in July and is closest to the sun in January! During the summer, the sun's rays hit the Earth at a steep angle. The light does not spread out as much, thus increasing the amount of energy hitting any given spot. The amount of sun a region receives depends on the tilt of Earth's axis and not its distance from the sun. The Northern Hemisphere experiences summer during the months of June, July, and August because it is tilted toward the sun and receives the most direct sunlight. This means that throughout the year, different parts of the planet receive the Sun's most direct rays when it is tilted closer. Thus, when the North Pole is tilted toward the Sun, it is summer in the Northern Hemisphere and winter in the Southern Hemisphere. The Sun is about 95 million miles away in summer, but just 92 million in winter and this is because Earth's orbit is elliptical, with Earth following the closer part of its path during the northern winter. You'd expect the nearer Sun to provide more solar energy to our planet and you'd be right: almost 7% more. During the winter months, the earth is actually closest to the sun in terms of distance with a mere 94 million miles separating the two objects, but the majority of the sun's energy falls along and south of the equator because the earth's axis remains tilted. The distance between the sun and the earth on the winter solstice (December 22) is 91.5 million miles, while the distance between the sun and the earth on the summer solstice is a whopping 94.5 million miles. So the earth is actually closer to the sun in December than it is in June. On average, Earth is 93 million miles from the Sun. Over the course of a year, though, that distances changes. Right now, for example, we're a million-and-a-half miles farther than average. In fact, tomorrow we'll be farthest from the Sun for the entire year. The day is on 3rd or 4th January, it is called the perihelion. That day, the gap between earth and sun was about 148 km aside. The aphelion and perihelion are those points of the orbit when the distance of the Earth from the Sun is greatest (152.1 million km) and smallest (147.3 million km) and occurs on 3–6 July and 2–4 January, respectively. Aphelion always happens in early July. About two weeks after the June solstice, Earth is farthest from the Sun. Perihelion always happens in early January. About two weeks after the December Solstice, Earth is closest to the Sun. Many people believe that the temperature changes because the Earth is closer to the sun in summer and farther from the sun in winter. In fact, the Earth is farthest from the sun in July and is closest to the sun in January! During the summer, the sun's rays hit the Earth at a steep angle. At the start of spring on (vernal or March) equinox, the Earth is at distance of about 1 AU = 149.6 million (M) km, from the Sun. Spring ends on summer (June) solstice. The Earth is then near aphelion = 152.1 M km. The reader could continue. In early January, when it is winter in the Northern Hemisphere, Earth is closest to the Sun. In early July, when it is summer in the Northern Hemisphere, Earth is farthest from the Sun. It happens because the Earth's orbit is elliptical, and at the present stage in its cycle the Northern Hemisphere is closest to the sun in January, and furthest from the Sun in July.