
The rule to remember when substituting for eggs, dairy, meat, fat, sugar, and/or animal by-products is that what you put in should function the same way (leaven, bind, tenderize, provide structure, etc.) in the recipe as what you take out.
Some products you can substitute cup for cup, as in, for example, soy or rice milk for dairy milk. Other ingredients need to be replaced by two ingredients to achieve the same function. For example, you’d need to replace buttermilk with a combination of non-dairy milk and lemon juice or vinegar. Some substitutions may require that you lessen or increase other ingredients in the recipe to compensate. For example, if you substitute oil for butter in a cake recipe, you’ll use only 7/8 cup oil for every cup of butter, and you’ll need to increase the sugar and egg substitute to avoid creating a heavy texture. Sometimes a substitute you may use to replace something in one recipe won’t work in another. For example, ground flaxseed mixed with water is a great substitute for eggs in baked goods, but won’t work in recipes where eggs create the structure of the food, as in meringues or cheesecakes, or in flourless cakes and cookies that rely on eggs for structure.
Use a great guide:
The absolute best, most comprehensive resource I can recommend for substitutions is The Complete Guide To Vegan Food Substitutions, by Celine Steen and Joni Marie Newman. Their guide covers substitutes for dairy, eggs, meat, animal by-products (honey & gelatin), gluten, soy, sugar, and fat. They walk you through how and what to substitute, and provide convenient substitution tables. Each section of substitutions gives you a sample of an “ordinary” recipe, like one from a Better Homes and Gardens cookbook, which has yucky ingredients swapped out for healthy, vegan ones. They also provide great recipes for staples, such as a gluten-free baking mix, eggless mayo, and seitan, as well as meals, desserts, and baked goods, such as their versions of shepherd’s pie, chocolate pie, and gingerbread cake. These are not hockey puck granola recipes. I am serious when I say these are better that what our society has grown up on. The switch to real, chemical-free, pain-free ingredients creates refreshing, delicious food.

Get it here:
http://www.amazon.com/Complete-Guide-Vegan-Food-Substitutions/dp/1592334415
It is also available on Kindle and iBooks, so there is no excuse not to have this amazing resource in your kitchen.
Get info online:
To get an idea of the role of different baking ingredients, you can check out FoodWorks.
http://www.foodworks-intl.com/page47_baking_ingredients_function.htm
(Note that the sweetener section is not complete; it leaves out agave nectar, date sugar, and maple syrup, among other alternatives.)
Cook’s Thesaurus, at http://www.foodsubs.com/, is another great resource for looking up ingredients, their functions, and possible substitutions.
The Post Punk Kitchen has a very informative, refreshingly-written piece on baking substitutions for vegans and when each substitute works best. You can find it here:
http://www.theppk.com/vegan-baking-the-post-punk-kitchen-shows-you-how/
Try substitutions I’ve used:
Replacing Milk (cup for cup):
*Coconut milk
*Soy milk
*Almond milk
Note: You can make your own. Blanch a 1/2 cup of raw, organic almonds, then slip the skins off when cool. It doesn’t hurt to leave the skins on, but they can have a bitter aftertaste. Blend up your almonds and 2 cups or so of filtered water, depending on how thick you like your milk. You may need to stop and stir, then blend again. Strain out the nuts that are leftover using a mesh filter. If you’re using the almond milk for a savory recipe, I wouldn’t add anything else, except perhaps a pinch of salt. If you’re drinking it or using it for baking, you can add agave nectar or date or maple syrup to taste.
*Rice milk
Note: Read this article from Vegan Reader about the connection between Rice Dream brand and Monsanto. It also provides a great, easy recipe for making your own rice milk.
http://www.veganreader.com/2009/05/17/how-to-make-rice-milk-and-stop-supporting-rice-dream/
Replacing Buttermilk:
Buttermilk acts differently than milk in recipes and can’t be replaced with milk alone. The acid in it reacts with baking soda to help baked goods rise. If your recipe calls for buttermilk, replace it cup for cup with
*1 cup of any milk alternative plus 1 tbsp lemon juice or vinegar
Replacing Cream:
*Tal Ronnen’s Cashew Cream
Note: The recipe is available in his amazing book, the conscious cook, and also on his website, http://talronnen.ca/recipes/cashew-cream/, where you can watch a video of Tal preparing it himself.
*Coconut cream
Replacing Butter:
*Earth Balance (available at Whole Foods)
*Coconut Oil (solid at room temperature, available at Whole Foods)
*Vegetable Shortening (Celine & Joni recommend subbing 3/4 c shortening for every cup of butter a recipe calls for.)
Replacing Oil:
*Applesauce
*Date paste
*Bananas
*Mashed avocado
*Mashed beans thinned with water or liquid sweetener
Replacing Eggs:
*For each egg replaced: Mix 1 tbsp ground flaxseed and 2-3 tbsp water, let sit a few minutes until thickened
Note 1: Use this in baked goods like cookies and cakes but not recipes in which the eggs provide much structure, like flourless cakes and cookies, meringues, etc.
Note 2: Buy whole flax seeds & grind them yourself in a cleaned-out coffee grinder, as ground flax easily goes rancid on store shelves – if you grind more than you end up needing, refrigerate unused portion in airtight container or plastic zip bag. Store unused flaxseeds in the freezer.
*Egg replacer, such as Orgran Gluten Free No Egg Natural Egg Replacer
Note: This comes in powdered form. It is used by mixing the powder with water, and can also be used straight in some recipes. Details for each brand differ. I get mine at Whole Foods.
Follow this link to the Post Punk Kitchen for a more comprehensive list for egg replacement, as well as which substitutes can be used in which sorts of recipes:
http://www.theppk.com/vegan-baking-the-post-punk-kitchen-shows-you-how/
Replacing Sugars:
If you decide to use granulated replacements in place of liquid sweeteners, or liquid sweeteners in place of granulated, your ratio of dry to wet ingredients will change, and you’ll need to adjust your recipe accordingly by increasing or decreasing your other liquids.
Replacing Granulated Sugar (refined white sugar isn’t vegan, as it is usually filtered with animal bone)
*Less refined sugar, such as Sugar In the Raw or Sucanat
*Brown sugar
*Molasses sugar
*Date sugar
Note: You can make this yourself by drying the dates (pits removed) in the oven at 400 degrees for 10 minutes then grinding.
Replacing Liquid Sweeteners (corn syrup, honey, etc.)
*Agave nectar
Note: Agave is great because it has a low glycemic index. This means it doesn’t spike your blood glucose levels like ordinary sugars do.
*Date syrup (I started using this after my recent move to teach at an international school in the Middle East. I love it because it has an earthy sweetness that is less sharp than refined sweeteners. It’s made of dates boiled in water.)
*Molasses
*Maple syrup (real, not the pancake stand-in)
*Celine and Joni mention using brown rice syrup or fruit syrups, which I haven’t yet tried.
Replacing Meat (in sausage rolls, cornish pasties, pot pies, etc.)
*Mushrooms (never underestimate the mushroom’s ability to mimic meat’s chewy mouthfeel or its ability to absorb any flavor it’s simmered in!)
*Chopped walnuts
*Soy meat substitutes (such as MorningStar Farms Veggie Sausage Patties)
*Tofu or tempeh
*Mycoprotein such as Quorn brand (I LOVE this stuff)
*Quinoa & lentils (both great sources of protein, and although quinoa is fluffy, like rice, mixed with lentils it can sub in baked goods where you might use ground meat)
*Beans (whole or mashed)
Alternatively, don’t bother subbing, and use great recipes instead:
I would be remiss if I didn’t also mention Vegan Baking Classics by Kelly Rudnicki. Because baking (in our society, at least) is so synonymous with eggs and dairy, oftentimes our attempts at recreating childhood favorites sans eggs and milk end up in the trash. If you want proven, scrumptious, like-you-had-at-home baked goods without the bother of reading up and testing new recipes, this baking book is an absolute must-have. Kelly began creating recipes for her son, who is fatally allergic to nuts, dairy, eggs, and legumes. Because she has five children to feed, she doesn’t use expensive or hard-to-find ingredients. These are recipes created by the drive a mother has for her children, and the necessities of low-cost, wholesome, easily accessible baked goods. Her first cookbook, The Food Allergy Mama’s Baking Book, was snapped up by vegans. This second baking book is a response to the demand.

Get it here:
http://www.amazon.com/Vegan-Baking-Classics-Easy-Make/dp/1572841125
Vegan Baking Classics is also available on iBooks and as a Google ebook.