Green plants and algae, along with some bacteria, are photosynthetic organisms. They use light energy to make glucose from carbon dioxide and water, so they make their own food. This is why they are called producers.
Animals cannot make their own food. They are consumers, and they get food by eating producers or by eating other animals that have eaten producers. Every food chain therefore starts with a producer.
The glucose made in photosynthesis is used to build new cells as the organism grows. This adds to its biomass, the mass of living material. When a consumer eats a plant or alga, this biomass passes along the food chain. Photosynthesis also releases oxygen, which most living things use in respiration. Almost all life on Earth depends on photosynthesis.