Summer will finally officially arrive. Daisies are blooming. Geese are molting. And baseball fans are cursing the Yankees. Each species is responding to the change in seasons, moving along to the steady rhythm of the Earth.

But what, exactly, set that rhythm in motion? Why do we have seasons at all?

That answer can be found at the dawn of our solar system, more than 4 billion years ago, when planets were forming from gas and dust swirling about the nascent sun. Small clumps of debris gathered into larger clumps, which merged into small planets, which then collided to form larger planets.

“The process of forming planets has a bunch of stages, and the last stage is what’s called the ‘giant impact’ phase,” said Doug Hamilton, a professor of astronomy at the University of Maryland. “That’s when the planets are pretty big, and there’s a lot of them, and you actually have planets running into one another.”

Scientists estimate that Earth suffered around 10 of these giant collisions. Each altered the tilt of the Earth by knocking it one direction or the other. In the last of these encounters, a rocky orb roughly the size of Mars smashed into the Earth. Upon impact, Hamilton said, it would have been traveling more than 10 kilometers per second, fast enough “that it would have melted everything. So immediately after the impact, you have a molten Earth that’s rapidly cooling.”

Hamilton said that scientists may spar over the details of the collision, but they broadly agree on what happened next. The Mars-sized planet hit the Earth at such an angle and with such force that it sent pieces of both celestial bodies flying into space. That debris settled into orbit around the Earth and eventually coalesced into the moon.

This impact was the last to alter the tilt of the Earth. Today, instead of rotating upright, the Earth’s axis is tilted 23.5 degrees. The angle varies a little over time, but the gravitational pull of the moon prevents it from shifting by more than a degree or so. This tilt is what gives us seasons.

The Earth’s axis always points the same direction, so as the planet makes its way around the sun, each hemisphere sees varying amounts of sunlight. For part of the year, the Northern Hemisphere leans away from the sun’s light. Days grow short, and temperatures drop. This is winter. Eventually, the Earth crosses over to the other side of the sun, where the Northern Hemisphere leans toward the light. Days grow long, and weather warms. This is summer.

Near the equator, the length of the day varies little over the course of the year, and the seasons are less pronounced. Closer to the poles, the length of the day fluctuates more, producing more dramatic seasons. The change in weather poses a challenge to plants and animals at higher latitudes, who have evolved different ways of coping.

Some, like the Baltimore oriole, chase the sun, heading south during the frigid months. Some, like the American mink, put on a winter coat, growing thicker fur when temperatures drop. Others, like the black bear, prefer to hibernate through the coldest part of the year. Many trees do as the black bear, going dormant during the winter. The sugar maple, for instance, casts off its leaves when sunlight wanes in the fall and grows them anew at winter’s end.

Come spring, plants and animals reawaken and reproduce. Their goal is to give their offspring as much time as possible to grow before the following winter. And so, when the weather warms, maples spread their seeds, orioles lay their eggs and minks give birth to their young.

“The boom and bust of the seasons has produced much more variation in animal and plant life resulting in much more complex ecosystems,” said Russell Foster, a professor of circadian neuroscience at the University of Oxford and co-author of “Seasons of Life,” along with Leon Kreitzman.

Without seasons, he said, there would be “fewer species with much less diversity in form and behavior. It is also possible that life would not exist at all. As we have a huge diversity of life-forms, there has always been some form of life that has been able to bounce back after major extinction events.”

Foster said the seasons have even shaped human history. In Europe, for example, “the seasons created variation in the availability of resources and the need for trade, which led to war to control the trade.” This is the legacy of those early celestial collisions.

Seasons are different on every planet. Mercury has no tilt, but it follows an elliptical path around the sun, drifting closer and then farther away, making the planet alternately warmer and colder. Mars has an elliptical orbit, like Mercury, in addition to being tilted, like Earth. Venus, by contrast, no seasons. Like Earth, it follows a circular path around the sun, and like Mercury, it essentially has no tilt.

If the Earth had no tilt, like Mercury or Venus, the sun would shine for 12 hours every day everywhere on the planet, as it does on the equinox. Washington would probably be spared the most bitter winter chills and sweltering summer heat, but it would also be deprived of changing leaves in autumn and the singular bloom of flowers in spring.

Fortunately, we live in a world of seasons. This month, we can relish in the arrival of summer, when the air warms and the sun traces a long arc across the heavens. At Friday’s solstice, the sun will rise before 6 a.m. and linger in the sky for almost 15 hours. For this, we can thank the celestial bodies that collided with the infant Earth billions of years ago, the last of which also gave us the moon.

Scientists have given a name to that body. Fittingly, they call it Theia, after the mythological Greek titan who is the daughter of the Earth and the sky, and the mother of the sun, the moon and the dawn.

Dig deeper: Weather + History

Want to explore how extreme weather has impacted history? Check out our curated list of stories below.

Mother Nature gave George Washington an assist in winning the Revolutionary War.

The National Hurricane Center started officially naming hurricanes in 1950. The naming system remained largely unchanged until 1979, when men’s names were introduced into rotation.

Scientists say that without seasons, not only would there would be less variety in plant and animal life, but it’s possible life wouldn’t exist at all.