The Earth receives energy from the Sun, and it also reflects and radiates energy back into space. This balance of incoming and outgoing energy creates our climate that supports life as we know it on Earth. The Law of Conservation of Energy states that energy can neither be created nor destroyed, but it can be transformed from one state to another. Energy from the Sun is delivered as light energy, and some of that energy is used to warm the Earth, and the differnces in densities of air and water between warm and cold regions of the atmosphere and oceans induce currents. Heat also drives the evaporation of water from the oceans and drives the water cycle. Some light energy is converted into chemical energy through photosynthesis, and stored as biomass. The petroleum we use today is the result of photosynthesis long ago. A small amount of the Sun's energy that reaches the Earth's surface is converted to electrical energy through photovoltaic cells and used to power lights and machines.
All of the energy that warms the atmosphere, oceans and land must be radiated back into space in order to maintain our current climate. If the amount of energy radiating back into space is decreased by even a very small amount, it can lead to warming. It is believed that increasing levels of carbon disoxide in the atmosphere has a 'greenhouse effect' of reducing the amount of energy radiated into space.