Food allergies often affect children who are predisposed to them, so if you have a family history of allergies, be on the lookout for any problems. Unfortunately there's not always much you can do to prevent them.
The best preventative measure is breast-feeding, and varying the food you give your baby later (after 6 months).