Various combinations of this make all the food we eat. You might wonder why trees do this. Trees make wood so they can reach as high as possible to collect more sunlight than their neighbors. Wood is the preferred method trees use to build tall, strong and flexible supports for their solar collectors. You may have seen their solar panel collectors all aimed at right angles to the sun.
Sugar is made in the leaves.
So now we have a little better view of trees and plants. They are organic self-replicating collectors of solar energy. Now, if making all the food on the planet was all that trees and plants did that would be quite a lot. However there is more. We burn the sugar we get from plants by combining it with oxygen in our bodies to release the energy we need to live.