Green plants make their own sugars by the process of photosynthesis.
Photosynthesis takes place inside the chloroplasts of plant cells. Chlorophyll, the green pigment found in chloroplasts, traps light energy, usually from the sun.
Plants also take in raw materials from the environment, water through their roots and carbon dioxide through the stomata of their leaves by diffusion.
Sugar is made for plants to use and oxygen is released into the atmosphere which is very useful for humans and other organisms that carry out aerobic respiration.
Energy cannot be produced or used up, it can only be converted from one form to another.
In photosynthesis, light energy is converted into chemical energy which is stored in the sugar molecules produced. This stored energy is then available to the plant cells to use.