We are totally dependent on plants to do that for us. You may be wondering who is eating all this sugar. Plants are quite handy in converting sugar into things like starch, oils, and if you add a little nitrogen, into proteins. 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.