Photosynthesis is the process by which plants, algae, and some bacteria use sunlight, water and carbon dioxide to produce oxygen and energy in the form of glucose. It occurs in the chloroplasts in leaves, where chlorophyll and other pigments absorb sunlight and use its energy to convert carbon dioxide and water into oxygen and glucose. This process provides a crucial source of food for plants and oxygen for animals, and removes carbon dioxide from the air.