The functions performed by the atmosphere are as follows:
It does not let the solar heat escape from the earth and hence maintains a constant temperature of earth by the phenomenon known as green house effect. Without the atmosphere the temperature of earth would have been very hot during days and very cold during nights.
It protects us from the harmful solar radiation (UV radiation) of sun. Ozone layer present in the atmosphere acts as shield against it.
The weathers, cloud formation, etc. also takes place in the atmosphere.
Atmosphere holds all the gases essential for life on earth.