Every living creature needs food and water to survive. Without food and water, a creature would die. Plants are also living creatures. So they need to have these things, too. Plants can create their own food. They do this in a process called photosynthesis.
Plants need sunlight in order to make energy. First, when the sun shines, chlorophyll in the plants captures the sunlight. Sunlight is just energy. So the chlorophyll is capturing energy. Then a plant needs two more things: water and carbon dioxide. That is when photosynthesis can take place. In photosynthesis, a plant undergoes a chemical reaction. Thanks to the chlorophyll, it creates sugar. The plant feeds on the sugar. The reaction also produces oxygen. The plant releases oxygen into the air, and people breathe it. So, without photosynthesis, people could not survive either.