number one: protects us from radiation
number two: Normally earth's ozone filtering the Ultraviolet radiation. And magnetic fields of earth deflecting the cosmic rays(charged particles).
Number three: it keeps the oxygen inside of the earth atmosphere
Number four: the magnetosphere protects us from solarwinds