ABSTRACT The aim of this study is to analyse the Earth habitability with respect to the direct exposition of the Earth atmosphere to the solar wind (SW) along the Sun’s evolution on the main sequence including the realistic evolution of the space weather conditions and the Earth magnetic field. The MHD code PLUTO in spherical coordinates is applied to perform parametric studies with respect to the SW dynamic pressure and the interplanetary magnetic field intensity for different Earth magnetic field configurations. Quiet space weather conditions may not impact the Earth habitability. On the other hand, the impact of interplanetary coronal mass ejections (ICME) could lead to the erosion of the primary Earth atmosphere during the Hadean eon. A dipolar field of 30 μT is strong enough to shield the Earth from the Eo-Archean age as well as 15 and 5 μT dipolar fields from the Meso-Archean and Meso-Proterozoic, respectively. Multipolar weak field period during the Meso-Proterozoic age may not be a threat for ICME-like space weather conditions if the field intensity is at least 15 μT and the ratio between the quadrupolar (Q) and dipolar (D) coefficients is $\frac{Q}{D} \le 0.5$. By contrast, the Earth habitability in the Phanerozoic eon (including the present time) can be hampered during multipolar low field periods with a strength of 5 μT and $\frac{Q}{D} \ge 0.5$ associated with geomagnetic reversals. Consequently, the effect of the SW should be considered as a possible driver of Earth’s habitability.