As we mention in the title, allergies and helminths could be closely related.
Allergies are categorized as a hypersensitive response. As the name implies, they occur when the immune system is hypersensitive to harmless agents. What we commonly know as allergies (asthma, rhinitis, dermatitis…) are really type I hypersensitivities. Four different types exist (I, II, III, IV) and they are classified according to the cells of the immune system involved in the reaction.
What do allergies have to do with “worms”?
As we already talked about in previous posts (as in how do vaccines work), the immune system has the capacity to create a wide range of responses depending on the pathogens detected. Helminths are extracellular parasites, so they do not infect by entering inside cells. For this reason, the immune system utilizes mechanisms that attack them directly and most of the involved cells belong the innate immune response*; eosinophils, mast cells and basophils.
A distinctive trait in parasitic infections is that Immunoglobulin E (or IgE) levels rise. IgE is a type of antibody (Ig = antibody) that is usually attached to the cellular surface. When IgE recognizes an antigen (part of a pathogen) it triggers a series of chain reactions inside cells, as degranulation in mast cells. This leads to the release of substances such as histamine. Long story short, an immflamation is triggered to try and eliminate the parasite.
*Innate immunity is a fast and unspecific response against pathogens.
**The existing antibodies are IgG, IgA, IgM, IgD and IgE. They have distinct functions and characteristics.
If you are allergic, you probably heard about these concepts already and might have figured out what is coming. Histamine and IgE are also involved in allergies and antihistamines are administered to stop the symptoms of allergy. Allergic reactions are just a mistargeted immune response, responding to antigens that do not really come from pathogens (such as pollen, animal hair, mites…).
So, why does this error happen so often?

What can we do to avoid allergies?
While allergies have an unavoidable genetic component and we are far from knowing all the mechanisms involved, we could say that a “bored” immune system can cause us harm. Pediatricians advise that kids should play with dirt, get dirty and lick all they can find; basically, to train a good immunity while they grow up.
References:
Okada, H., Kuhn, C., Feillet, H. and Bach, J-F. (2010). Clin Exp Immunol, 160(1): 1-9.
Fitzsimmons, C.M., Falcone, F.H. and Dunne, D.W. (2014) Front Immunol, 5:61.