The dominant thing that sugar is used for in plants is it’s structural potential, such as the polysaccharide cellulose which makes plant cell walls. It’s secondary function is energy storage. Perhaps surprisingly, it’s primary function is not energy as it has multiple forms of energy that precursor it’s production of sugar, such as ATP. Likewise, human use of plants is for these two reasons, but perhaps sugar for energy is primary to it’s harvest for fiber.
Carbohydrates are essentially carbon atoms and water molecules, hence “carbo” and “hydrate”. In terms of sugar and it’s aggregates, carbohydrates can exist as monosaccharides, oligosaccharides, and polysaccharides (“single-sugar”, “few-sugar”, and “many-sugar”, respectively). The aggregation occurs as monosaccharides link together via glycosidic bonds (named after glucose [a type of saccharide]). Glycosidic bonds are not exclusively sugar-sugar bonds but rather the way in which sugars bond to other things. In the case of plants and their carbohydrate fibers, glycosidic bonding links the monosaccharides they produce into polysaccharides, which are deposited into cell walls and other structural regions.
Note: wood is lignin and a hydrocarbon-based polymer, not a carbohydrate polymer, but all plant cell walls are made of cellulose. Wood and bark are lignin deposits.
So, to focus on cellulose, it is a long chain of hundreds or more glucose molecules covalently bonded via glycosidic bonds into an insoluble and high tensile strength fiber. In this sense, and a broad sense, plants are made of sugar. A lot of the photosynthetic work they do to make sugar is used to make cellulose for their cells and then the left over is kept in the cells for later energy use and cell growth.
Notable: The hydrocarbon sugar structure of plants is sourced primarily from the carbon oxides in the atmosphere and water. Plant protein’s nitrogen sources come indirectly from the atmosphere via soil bacteria that can make bioavailable amines from otherwise inert N₂; a small but significant source of N also comes from the release of biomass from rocks. Overall, the mineral and micronutrients come from both the dirt and soil, as well as wind-borne dust deposits. Point is: plant structure is mostly water and air with a little dirt and germ poop; all assembled with solar energy.