I want to add a related question to this very interesting topic; did anyone ever perform an assassination, successful or not, by way of exploiting allergies?
This is a really interesting question!
Might I also add a related question: would allergic reactions historically be curable? Even in a context where they didn't understand the cause, would they have been able to successfully save some one having an allergic reaction?
A brief history of major studies relating to allergies them can be found here
A large number of studies into allergies, including seasonal allergies, were conducted in the 1910s to 1940s as interest grew, though a real understanding of why certain allergens caused problems with particular people was not fully know for some time.
A good timeline of different historical perspectives on allergies is given here with parts 2 and 3
Important part: "1902 - Based on an experimental induction of hypersensitivity in dogs, Charles R. Richet proposed the term anaphylaxis. Richet and his colleague Paul J. Portier repeatedly observed unexplained sensitization and death of lab animals following a second dose of antigen. Later on, researchers established that anaphylaxis not only occurred after exposure to toxins or venoms, but also to milk, egg whites, and various other animal proteins."
If anyone wants to summarise particularly good sections from those they can below.
I wouldn't say it was exactly understood (the modern concept of allergy was only introduced at the start of the 20th century), but historically there has been an awareness that certain normal foods can affect individuals negatively. Hippocrates describes the importance of knowing this in de prisca medicina:
"For cheese (since we used it as an example) does not prove equally injurious to all men, for there are some who can take it to satiety without being hurt by it in the least, but, on the contrary, it is wonderful what strength it imparts to those it agrees with; but there are some who do not bear it well, their constitutions are different, and they differ in this respect, that what in their body is incompatible with cheese, is roused and put in commotion by such a thing; and those in whose bodies such a humor happens to prevail in greater quantity and intensity, are likely to suffer the more from it. But if the thing had been pernicious to of man, it would have hurt all. Whoever knows these things will not suffer from it."
All sources I can find seem only to extend to mild discomfort or rashes however, there is no accurate record of a food allergy causing anaphylaxis (though it is likely such a severe reaction might have mistaken for a number of other things). Similarly no historical scholar I can find links asthma with diet.
There is one particular incident from history that may be explained by a chronic food allergy however. In 1483 King Richard III quickly rounded on his friends and family to claim the throne for himself (with the famous imprisoning of the young princes in the tower). Sir Thomas More, an admittedly anti-Richard source, describes the morning he announced his intentions in his history of Richard III. Apparently Richard had been in fine form in the morning, and had asked for some of the fine looking strawberries from Archbishop Morton's garden. He returned to the council chambers and hour later a changed man with a "wonderful sour angry countenance, knitting the brows, frowning and fretting and gnawing on his lips". He accused the council of cursing him; "by their sorcery and witchcraft wasted my body. And therewith he plucked up his doublet sleeve to his elbow upon his left arm, where he showed a werish 3 withered arm and small, as it was never other". Obviously this is open to interpretation but could easily be the results of a severe allergic reaction to the earlier consumed strawberries (rash, weakness, quick onset, distress, common food allergy). Either way he sentenced the lords to death and imprisoned his nephews, ruling for a few years until defeated by Henry Tudor at the battle of Bosworth.
Sources: Sir Thomas More's history of King Richard III, "The History of Allergy in Antiquity " chapter of "History of Allergy" by Bergmann and Ring., Charles Darwin's translation of Hippocrates De Priscia Medicinawith the conspiracy summarized by this new statesman article