The length of days and nights on Earth is primarily determined by the tilt of the Earth's axis in relation to its orbit around the Sun. This phenomenon is responsible for the changing seasons as well as the variation in day length throughout the year.
During different times of the year, the Earth's axis tilts either towards or away from the Sun. When the Northern Hemisphere is tilted towards the Sun, it experiences summer, while the Southern Hemisphere experiences winter. Conversely, when the Northern Hemisphere is tilted away from the Sun, it experiences winter, while the Southern Hemisphere experiences summer.
During the equinoxes, which occur around March 21st and September 21st each year, the Earth's axis is neither tilted towards nor away from the Sun. On these days, the length of day and night is roughly equal, resulting in approximately 12 hours of daylight and 12 hours of darkness.
However, during the solstices, which occur around June 21st and December 21st each year, the tilt of the Earth's axis causes a significant difference in the duration of daylight and darkness. During the summer solstice (June 21st in the Northern Hemisphere), the tilt of the Earth's axis causes the North Pole to be inclined towards the Sun, resulting in longer days and shorter nights in the Northern Hemisphere. On the other hand, during the winter solstice (December 21st in the Northern Hemisphere), the North Pole is tilted away from the Sun, leading to shorter days and longer nights.
It's important to note that the specific lengths of days and nights vary depending on an individual's location on Earth. The closer one is to the poles, the more extreme the differences in day length become throughout the year. Near the equator, however, the length of day and night remains relatively consistent throughout the year.