Solar radiation and geological processes over the first few million years of Earth’s history, followed soon thereafter by the origin of life, steered our planet towards an evolutionary trajectory of long-lived habitability that ultimately enabled the emergence of complex life. We review the most important conditions and feedbacks over the first 2 billion years of this trajectory, which perhaps represent the best analogue for other habitable worlds in the galaxy. Crucial aspects included: (1) the redox state and volatile content of Earth’s building blocks, which determined the longevity of the magma ocean and its ability to degas H2O and other greenhouse gases, in particular CO2, allowing the condensation of a water ocean; (2) the chemical properties of the resulting degassed mantle, including oxygen fugacity, which would have not only affected its physical properties and thus its ability to recycle volatiles and nutrients via plate tectonics, but also contributed to the timescale of atmospheric oxygenation; (3) the emergence of life, in particular the origin of autotrophy, biological N2 fixation, and oxygenic photosynthesis, which accelerated sluggish abiotic processes of transferring some volatiles back into the lithosphere; (4) strong stellar UV radiation on the early Earth, which may have eroded significant amounts of atmospheric volatiles, depending on atmospheric CO2/N2 ratios and thus impacted the redox state of the mantle as well as the timing of life’s origin; and (5) evidence of strong photochemical effects on Earth’s sulfur cycle, preserved in the form of mass-independent sulfur isotope fractionation, and potentially linked to fractionation in organic carbon isotopes. The early Earth presents itself as an exoplanet analogue that can be explored through the existing rock record, allowing us to identify atmospheric signatures diagnostic of biological metabolisms that may be detectable on other inhabited planets with next-generation telescopes. We conclude that investigating the development of habitable conditions on terrestrial planets, an inherently complex problem, requires multi-disciplinary collaboration and creative solutions.