Some of the first spaceflight-related sets were already released during the 1970s, 358 Rocket Base (1973) and 367 Moon Landing (1975). These early sets did not include any minifigures yet but were relatively close to reality.
The first minifigure-compatible sets involving spaceflight were introduced in 1978 as part of the Space theme which focused more on the science fiction aspect of the subject. A more realistic approach was taken in 1990 when the Town set 1682 Space Shuttle that included a NASA space shuttle with launch pad was released. A larger subtheme focusing on real-world spaceflight followed in 1995 with Launch Command. Its successor from 1999, Space Port veered of into more fictional territory by introducing less realistic space craft. During this interlude of spaceflight in the Town theme, the Space theme saw regular releases until 1999. Lastly featuring the first space aliens of LEGO, starting with UFO in 1997.
After a short hiatus spaceflight was brought back to the LEGO universe with a short-lived revival of the Space theme in the form of Life on Mars. This line was somewhat of a mix of the more realistic Town subthemes and the highly fictional older Space subthemes. While the vehicles looked partially realistic, there were also green aliens.
The next spaceflight related sets were not seen until 2007, when Mars Mission was introduced, which was similar to Life on Mars in both setting and color scheme, albeit clearly on the science fiction side of spaceflight. In 2009 this theme was succeeded by third Space Police theme of LEGO, which featured once again a science-fiction setting with aliens.