the sun is used for giving warmth to the earth