SUGAR plays a very important role in baking. Sugar is responsible for keeping baked goods soft, moist and tender.
Sugar Molecules + Water Molecules = Strong Bond
Sugar locks in moisture to prevent baked goods from drying out too quickly.
Shape & Structure
The shape and structure of baked goods come from combining protein and starches. These firm up during the baking process which results in soupy batters turning into the brownies and cupcakes you love. Ever notice that chocolate cake batter is soupy when you're mixing it, and that once it's baked its fluffy? That's the result of different compounds interacting with each other under heat.
Properly measuring sugar makes a significant difference in how that particular baked good comes out. Under or over measuring sugar will throw off the structure of your baked goods. This can result in a baked good that can't hold its shape, or it can come out dense. No one wants a flat dense cake.
Creaming sugar with other fats (butter, eggs, etc), creates air bubbles that expand and lift the batter which causes baked goods like cupcakes to rise. Under creamed sugar will result in a flatter cupcake.
Is a chemical reaction between amino acids and sugar. (Think about cookies that are browned on the edges, or browning of bread or cake). This chemical process reacts with heat and proteins which result in a baked goods distinct flavor and aroma.
C24H36O18 + C36H50O25 + C125H188O80 = Brown Color
Sugar molecules break down with heat becoming smaller and smaller. As this happens, the sugar gets darker in color.
If you're looking for a replacement for a sugar that you don't have, you can make the following swaps:
Granulated Sugar --> 1:1 ratio of Brown Sugar
Brown Sugar --> 1 cup granulated sugar + 1 Tbsp. molasses
Powdered Sugar --> 1:1 ratio of granulated sugar in a food processor until fine