In addition to long-lived radioactive nuclei like U and Th isotopes, which have been used to measure the age of theGalaxy, also radioactive nuclei with half-lives between 0.1 and 100 million years (short-lived radionuclides, SLRs) were present in the early Solar System (ESS), as indicated by high-precision meteoritic analysis. We review the most recent meteoritic data and describe the nuclear interaction processes responsible for the creation of SLRs in different types of stars and supernovae. We show how the evolution of radionuclide abundances in the Milky Way Galaxy can be calculated based on their stellar production. By comparing predictions for the evolution of galactic abundances to the meteoritic data we can build up a time line for the nucleosynthetic events that predated the birth of the Sun, and investigate the lifetime of the stellar nursery where the Sun was born. We then review the scenarios for the circumstances and the environment of the birth of the Sun, within such a stellar nursery, that have been invoked to explain the abundances in the ESS of the SLRs with the shortest lives — of the order of million years or less. Finally, we describe how the heat generated by radioactive decay and in particular by the abundant 26Al in the ESS had important consequences for the thermo-mechanical and chemical evolution of planetesimals, and discuss possible implications on the habitability of terrestrial-like planets. We conclude with a set of open questions and future directions related to our understanding of the nucleosynthetic processes responsible for the production of SLRs in stars, their evolution in the Galaxy, the birth of the Sun, and the connection with the habitability of extra-solar planets.