It is an essential building block of sugars such as glucose, formed in the photosynthesis process. Carbon is removed from the CO 2 and then used to form a simple sugar, used for energy and for building blocks to form more plant tissue. Water must be available for photosynthesis to occur. Once the plant produces sugar it can then use a portion of that sugar to produce the plant cell bodies. Some of the plant is in the form of protein, and all proteins require nitrogen as well as carbon, oxygen and hydrogen.
Some proteins also require sulfur.
So carbon is an essential element for all known life, and most is obtained from carbon dioxide in the atmosphere. It is obtained from eating plant or animal tissues.