Eggs as thickeners
Eggs are used to thicken sauces, custards, and fillings. The proteins in the egg coagulate as the egg is heated and thickens the liquid. If there are enough eggs, such as in a custard pie, the liquid will set and become firm. Both the whites and the yolks have proteins that will coagulate but the yolks are richer in fat and provide a creamy mouth feel that is pleasing.
Eggs begin to coagulate between 144 degrees and 158 degrees—well below the boiling point. The whites coagulate at a lower temperature than do yolks. The presence of sugar, starch, or water will raise the threshold at which eggs coagulate but if eggs become too heated they scramble and are no longer smooth. (Picture an egg in your frying pan. As it heats, the white becomes milky and thickens. The white sets before the yolk. Once the yolk sets, it is hard and crumbly—unfit for a sauce.)
Eggs as leaveners
Beaten egg whites, yolks, or whole eggs are used as leaveners in many cakes and soufflés by trapping air in the foam. Beaten egg whites have more volume and therefore more leavening ability than do yolks. The fat in the yolks retards foaming.
Eggs as emulsifiers
Oil and water inherently want to separate. An emulsifier is a bonding agent that brings opposing molecules, such as oil and water, together. You can whip oil and water together forever and never achieve a smooth mixture. Add an egg and you have a creamy sauce.
Eggs provide structure
As the proteins in eggs coagulate, they provide structure to many baked goods. (Try leaving the eggs out of a cookie or cake recipe and see what happens.) As the batter cooks, the proteins slowly set and give the baked good the structure it needs to keep from falling as it cools. (The starch and proteins in flour lend structure also.)
Other egg uses
Eggs provide moisture and fat in baked goods. The fat in eggs can be a shortening, reducing the gluten strands in flour and making for a more tender baked good. The fat also contributes mouth feel.
Eggs inhibit the forming of sugar crystals in some syrups, frostings, and candies.
Egg whites are used in royal icings to set the icings and give them harder shells.
Eggs are used as attractive washes for pastries and breads. An egg white creates a clear luster. An egg yolk creates an attractive bronze finish. (To use an egg wash, whisk an egg, an egg white, or an egg yolk with one tablespoon water. Brush the egg wash on the bread or pastries just before baking.)