Plants play a very important role in the cycling of nutrients in the environment. Carbon in the form of carbon dioxide is absorbed by plants, that during the process of photosynthesis can convert it into carbohydrates. The carbohydrates are stored by the plants in their body which is primarily made up of carbohydrates. The carbon passes from plants to animals when they are eaten and released back into the atmosphere as carbon dioxide during respiration. When plants die, the carbohydrates in them is released as carbon dioxide when they decay or are burnt. If the plants get buried, it leads to the formation of carbon based fuels like petroleum and coal.
Nitrogen is one of the primary gases that makes up the atmosphere. Plants cannot use nitrogen directly from the atmosphere, it has to be converted to other compounds of nitrogen to be used. This is primarily done by bacteria in the soil. The nitrogen compounds are essential for plants to survive as it makes up chlorophyll that is an enzyme used in photosynthesis. Plants are also the primary source of nitrogen compounds for animals. When animals and plants die, microbes convert the nitrogen compounds in them and it is stored in the soil to provide nutrition for plants again.
Phosphorus is also an essential nutrient for plant growth. It is found in the soil as phosphate compounds in a limited quantity. Phosphates are released from rocks that contain these compounds and are now also being produced artificially as fertilizers that are used for cultivation of plants. Plants need phosphates as phosphorus forms a part of their cells. Animals eat plants to gain the phosphorus they need. When plants and animals die, the phosphate compounds go back to the soil and become nutrients for the next generation of plants.