The atmosphere is transparent to many frequencies of electromagnetic radiation. Much of the power received from the Sun is in the visible and ultraviolet regions. This causes the surface of the Earth to warm up and radiate in the infrared (heat). Some of this infrared radiation is absorbed by gases in the atmosphere, causing the atmosphere to warm up, and re-radiated in all directions. The net effect is that the atmosphere and the surface of the Earth are warmed.