When the Earth is in the position shown above, the Northern Hemisphere experiences the beginning of summer because that hemisphere is tilted towards the Sun.
The position in the first image will lead in longer and warmer days because the northern hemisphere is closer to the sun than that of the southern hemisphere.
So, Earth's seasons are determined by its tilt of 23.5° relative to the sun. When the Northern Hemisphere is closer to the sun, it experiences summer with longer daylight hours and direct sunlight. In the first picture, where the Northern Hemisphere is closer, days are both longer and warmer.