Allergies are caused by our bodies' immune system identifying a normally harmless proteien, polypeptide chain or cell membrane as Satan's brew, and launches a vicious autoimmune response to combat the invader. It's kinda like american and isreali politics

. But I digress.
Your lymphocytes (white blood cells) are responsible for identifying foreign substances in your body. The basic immune response is part and parcel of our immune response. Our cell membrane have marker proteiens imbedded in them that serve as a fingerprint to the lymphocytes. Those marker proteiens are unique to each person, they come from our genetic makeup.
Now, whenever a foreign cell or unidentified proteien is encountered, the lymphocytes may decide that it is evil, and an antibody response is generated - the target substance is coated by immunoglobulin antibodies which serve as a beacon for your phagacytes (those white blood cells that "eat" trash in your body). The immunoglobulin response is also "remembered" for future reference. This action also releases a substance called HISTAMINE which acts a a blood vessel dilator, and causes blood and white blood cells to rush to the area. This is what causes swelling. If you've been scratched by a cat or stung by a bee, that localised swelling is caused by HISTAMINE, the cream you rub on to combat the swelling is thus an ANTI-HISTAMINE. Geddit?
Now, sometimes the HISTAMINE reaction gets out of hand, and the swelling and hot flushing can cause lots of discomfort, and sometimes the swelling closed of your throat can be fatal, or the massive antbody reaction can even cause heart failure or coma, and death. Kind of ironic, isn't it.
Is it genetic? Well, obviously, the basic makeup of the immune response is genetic, and because of that, it differs slightly between persons. But often a substance might cause a slight reaction, but then a slightly different substance is misidentified, and a vicious allergic reaction ensues. In other words, someone might be alleric to shellfish, but only because they happened to have eaten a truffle ten years previously. See what I'm getting at? If they hadn't eaten the truffle, they might very well be able to enjoy shellfish now.
99% of immune responses are acquired, the rest are genetic. Allergic reations tend to be almost 'coincidental', and are a mixture of various factors and happenstances.
The point is, it's unlikely that the allergy will be inherited. Acquired immune responses aren't programmed back into our genetic makeup. A baby is a clean slate, it only gets a basic antibody set from mother's milk, to help it along, and from there the immune system is on its own and has to learn everything.