Yes. There are scientific reasons and treatments involving worms and allergies or other immune system disorders. But the results are not overly conclusive and still understudied.
This is based on the so called hygiene hypothesis in immunology.
Short version to this: our immune system evolved in a world full of dirt and germs where it had to be quite aggressive against all those threats and invasions in order to keep our ancestors alive. In recent years – since Leuwenhoek, Semmelweiss, Lister, Koch and Pasteur – we learned that and how germs could make us ill and tried to eradicate all of them. Or at least keep them away from us as to limit the danger of getting infections.
That would theoretically translate into the very simple reasoning: Trying to eliminate all germs, or improving hygiene, ensures a much healthier population across the board. But the problem observed was that allergies were on the rise into previously unheard of dimensions despite the direct living environments getting cleaner and cleaner. That is, in modernised or Western societies allergies have become very widespread. In less developed nations the rise of allergies was seen as much less pronounced.
The hypothesis is now that a lack of actual threats and "proper training" is directing the immune system to attack otherwise rather benign substances (like pollen) or even the own tissues (auto-immune disorders). Turning this process from its head back to its feet again it was then tried whether a deliberate infestation with once very common hookworms might alleviate the symptoms of sufferers. And apparently it sometimes did.
Apart from currently being still very promising there are downsides to its applications. The effects seem to rely quite heavily on early childhood exposure and diminish with age. Having a worm is not much fun and of course, once the worms have "modulated the immune system" you have to get treatment to get rid of them again (which might cause an impressive range of side-effects on its own; example).
And while overuse of certain hygienic agents, like disinfectants and antibiotics, are certainly a problem, cutting back radically on hygiene or even to introduce deliberate infections of any kind seem like an easy inference – and a bat droppings crazy stupid one on top. It's complicated and we're still figuring out much of the basics.
Good overviews are presented here: Worm therapy. Why parasites may be good for you and Health by Hookworm and Gut instinct: the miracle of the parasitic hookworm.
Although there were early speculations about this coming from Russian fringe doctors many decades ago and emerging in Western science in the seventies, the hypothesis really came into form with Hay fever, hygiene, and household size and took off after German reunification provided a really large quasi-experimental corroboration for it.
Another word for this is helminthic therapy. This whole concept is now even largely superseded (or refined?) with the Old Friends hypothesis, including bacteria and even viruses. This presents a much more re-balanced view of "us"– taking for example also our whole microbiome into consideration and not just a few "key players" like the hookworm in question.
More up-to-date and in a more scientifically constructed wording than the gross oversimplifications above are these papers:
Interactions between helminth parasites and allergy(2009)
Helminth infections have strong modulatory effects on anti-parasite inflammatory responses in the human host but it is not clear if helminths can affect allergic inflammatory responses to aero-allergens. Helminth infections have been associated with both a reduced prevalence and increased prevalence of atopy and atopic disease in different populations. The immune regulatory effects of tissue helminths are likely to be stronger than those of geo-helminths. Further research in prospective observational and intervention studies is required to address the question of causality. An understanding of the mechanisms by which helminth parasites modulate the host allergic inflammatory response may lead to the development of novel anti-inflammatory interventions. The demonstration of a causal association between some helminth parasites (particularly geo-helminths and toxocariasis that have a worldwide distribution) and an increased risk of asthma could lead to anthelmintic treatment programmes in populations considered to be at high risk.
The Hygiene Hypothesis and Its Inconvenient Truths about Helminth Infections(2016)
Current iterations of the hygiene hypothesis suggest an adaptive role for helminth parasites in shaping the proper maturation of the immune system. However, aspects of this hypothesis are based on assumptions that may not fully account for realities about human helminth infections. Such realities include evidence of causal associations between helminth infections and asthma or inflammatory bowel disease as well as the fact that helminth infections remain widespread in the United States, especially among populations at greatest risk for inflammatory and autoimmune diseases.
That means that the parasites are well known to be able to modulate the immune system response. But this does not translate into proven, always beneficial effects. It can also go very wrong and actually worsen any associated condition. We do not know with certainty how the parasites do it. We do not know with certainty which parasites might be good or bad for what. We do not know with certainty if early exposure (at a young age), where the observed effects seem strongest, is necessary and therefor a treatment for adults much less effective. Having parasites is not very pleasant, just copying their mechanism looks much more promising.
A recently emerged attractive alternative hypothesis to explain the rise of inflammatory diseases is a “biome depletion” theory. This suggests inflammatory disease may be due to a loss of species diversity or alteration of composition of the commensal microbiome within the human body.
The immense conflicting data regarding the benefits versus harms of live helminths as a therapeutic modality to date warrants further questioning of the utility of additional human clinical trials. Therefore, directing future research and trials towards helminth-derived immunomodulatory molecules allows for safer and better-described therapies that could alleviate the suffering from autoimmune conditions without the commensurate risk of a parasite infection. Indeed, the aim of experimental animal models should be to develop novel treatments that mimic the effects of helminths without requiring the presence of parasites in the host.
Human helminth therapy to treat inflammatory disorders – where do we stand? (2015)
Parasitic helminths have evolved together with the mammalian immune system over many millennia and as such they have become remarkably efficient modulators in order to promote their own survival. Their ability to alter and/or suppress immune responses could be beneficial to the host by helping control excessive inflammatory responses and animal models and pre-clinical trials have all suggested a beneficial effect of helminth infections on inflammatory bowel conditions, MS, asthma and atopy. Thus, helminth therapy has been suggested as a possible treatment method for autoimmune and other inflammatory disorders in humans.
Especially in relation to asthma:
Asthma & Helminthic Therapy. Evidence for the use of helminthic therapy to treat Asthma.