Plants produce sugars to use as storage molecules and structural components for their own benefit. By utilizing the energy of the sun, along with inputs of water and carbon dioxide, plants act as glucose factories. Photosynthetic organisms are the primary producers of glucose on the planet. They also produce oxygen gas as a byproduct and thus serve as the foundation of life, providing food and oxygen for the complex food webs on both land and in the oceans.