If you follow space news and rocket launches, a term you'll often hear used is "launch window." It refers to the period during which a launch can take place, typically between a few days and a few weeks in duration. There are a whole lot of factors that go into determining when it's possible to launch a rocket, so agencies like NASA use launch windows to give guidance on when a good time to launch is.
The exact launch window for any given mission will depend on where a rocket is launching towards. Traveling to the International Space Station, for example, is relatively easy as the station sits in low-Earth orbit and is close by. That's why missions to the space station are relatively easy to schedule.
Traveling to Mars, however, is more complicated business. Think of how Mars orbits the sun. To send a rocket to Mars efficiently (and without spending a ton of money), you want to launch it when the two planets are at their closest to each other. This happens around once every two years because one year on Mars is a bit less than two years on Earth.
The European Space Agency uses the analogy of the solar system as an athletics race track, where it would take a lot of energy to chase down a runner who you wanted to intercept. If you walk across the center of the track instead, you could intercept the runner on the other side much more efficiently.
Lining up just right
Therefore, Mars missions need to be launched during a short time when the planets are closest, which is why you get groups of missions all launching around the same time — like in the summer of 2020, when the NASA Perseverance rover, the UAE Hope mission, and the Chinese Tianwen-1 mission all launched to Mars around the same time.
This allows spacecraft to use a Hohmann transfer orbit to travel to a target in the solar system efficiently. The launches need to happen at just the right time to leave Earth and travel to their destination just as the target reaches the same position.
Launch windows are tricky because if a mission misses its window, it has to be deferred until another window opens, causing delays that can be extremely expensive. NASA's Psyche mission to visit a metal asteroid, for example, was supposed to launch around September or October 2022, in order to make the trip to the asteroid belt between the orbits of Mars and Jupiter. But software problems with the spacecraft caused it to miss this launch window. Now the spacecraft will have to wait until at least July 2023 before launching.
And don't forget there are many other factors in the timing of rocket launches as well. The weather needs to be good, and scheduling needs to take into account any other launches that might be happening around the same time.
Launching to the moon
NASA recently shared insight into how its launch window scheduling works for the first Artemis mission which will send an uncrewed spacecraft into orbit around the moon. There were launch windows available for this mission from August to December 2022, and NASA described the conditions it had to meet for these windows.
"These launch periods account for the complex orbital mechanics involved in launching on a precise trajectory toward the Moon while the Earth is rotating on its axis and the Moon is orbiting Earth each month in its lunar cycle," NASA writes. "This results in a pattern of approximately two weeks of launch opportunities, followed by two weeks without launch opportunities."
The launch periods are determined not only by where you are trying to send the rocket to — in this case, the moon — but also by the type of orbit and injection that is planned. For Artemis I, the rocket will perform a trans-lunar injection burn which is the maneuver to go from Earth orbit past the moon. And coming back, the Orion spacecraft, now separated from the rocket, will perform a skip entry maneuver in which it slows itself by dipping into the Earth's atmosphere.
The launch periods have to allow for these particular maneuvers, as well as additional concerns like ensuring the spacecraft gets enough sunlight to keep its solar panels collecting energy and that there is enough daylight for personnel to safely collect the spacecraft from the ocean when it splashes down.