Flour provides the structure for the product. The gluten/protein in flour combines to form a web that traps air bubbles and sets. Starch in flour sets as it heats to add to and support the structure. In cakes, cookies & quick breads, we want little gluten formation which makes products tough. Fats & sugars help prevent gluten formation. In most baked goods, all-purpose flour is a good choice; it has less gluten than bread flour.
Fat coats gluten molecules so they can't combine as easily, contributing to the finished product's tenderness.
Sugar adds sweetness, as well as contributing to the product's browning. Sugar tenderizes a cake by preventing the gluten from forming. Sugar also holds moisture in the finished product. Sugar crystals cutting into solid fats like butter help form the structure of the product by making small holes which are filled with CO2 when the leavening agents react.
Eggs are a leavening agent & the yolks add fat for a tender & light texture. The yolks also act as an emulsifier for a smooth & even texture in the finished product. The proteins contribute to the structure of the baked good.
Liquid helps carry flavorings throughout the product, forms gluten bonds, & reacts with the starch in the protein for a strong but light structure. Liquids also act as steam during baking, acting as a leavening agent & contributing to the tenderness of the product.
Salt strengthens gluten and adds flavor. Salt enhances flavors. In yeast breads, salt helps moderate the effect of the yeast so the bread doesn't rise too quickly.
Baking soda & baking powder form CO2, that is held by fat pockets, gluten & starch, which makes the baked product rise. Too much leavening agent will make the bubbles too big, then they combine & burst, leading to a flat cake or bread. Too little leavening agent will result in a heavy product, with soggy or damp layers.