Are their any regular subsitues for nuts at all when baking cakes, or can you just leave them out?
If the cake or cookie contains whole or chopped nuts - generally folded in towards the end of the recipe or stirred into the dry ingredients in a recipe -then they are usually there to add some texture and it is fine to leave them out, or you can in some cases substitute an appropriate alternative (please check first with the person who has the allergy) such as sunflower seeds, pumpkin seeds or pine nuts (these are actually seeds). However if the nuts are finely ground, such as ground almonds/almond meal/almond flour or ground hazelnuts, then it is difficult to substitute these or leave them out as they they tend to be used to add moisture to the finished cake or cookie.
If peanut butter is used in a recipe then it is worth trying sunflower seed butter (sometimes labelled as sunbutter) as a substitute. This is a relatively new product but is similar to peanut butter in texture and fat content. You are most likely to find it in good health food stores or on-line.