Plants have specialized cells named cloroplasts. As the sun shines on these cell, they use the energy along with carbon dioxide and water to produce sugars through a process called photosynthesis. This is from a combination of Greek words meaning "light" and "to make or combine."
The plant uses some of this sugar for its own growth. Many plants have a symbiotic relationship with microorganisms and they share the sugar though their root system in exchange for nitrogen and other nutrients.
Some parts of the plants, such as the fruit, stores large amounts of the sugar. Some of it is converted into starches. Corn, potatoes, rice and wheat are examples. The plant sugars and starches are an important part of a person's diet.