Chemical energy is stored in the molecular bonds of the sugar. Both photosynthetic and non-photosynthetic organisms undergo respiration. Some of the plant material dies and is burned by bacteria and other decomposers. Stored photosynthetic energy can also be released by burning. The equation for fire is the same as for respiration, except that the release of energy is almost entirely as heat and the reaction is uncontrolled.
Respiration is under tight control in living organisms.
Volcanic activity also adds a small amount CO 2 to the atmosphere. Carbon is continually fixed by photosynthesis and converted back into CO 2 by respiration, so over short intervals, the amount of CO 2 remains relatively constant. However, some of the fixed carbon is removed from the system by sedimentation and burial before it gets respired. Because of burial, over the millennia, oxygen has been slowly accumulating in the atmosphere and carbon dioxide has declined. The carbon they fixed while alive was removed from the atmosphere during photosynthesis when they were alive.