In baking, citric acid is used to enhance flavor by adding a bright, tangy taste to desserts and breads, act as a leavening agent when combined with baking soda to create a lighter texture, and preserve baked goods by extending their shelf life. It's a versatile, flavor-neutral acid that serves as an alternative to liquid acids like lemon juice or vinegar.