My experience
Last year, I had a child with severe diabetes. (So severe, she was put on a pump when she was 3.) This year, I have a child who has a potentially fatal allergy to nuts/nut products and one who is allergic to dairy products (they think!).
This has worked well with both situations. At the beginning of the year with all the information about sending birthday snacks, etc. I put that if you are going to send/bring a special snack, I must know what it is at least two days in advance due to allergies/medical conditions....and that I want to be sure it's something all students can have. This gave me time to call the parent bringing it if it was something that someone couldn't have. It also gave me enough time to let the diabetic's mom know what the special snack would be. Her mom is VERY efficient at carb counting. This way, she could "save" enough carbs to enjoy the snack with us. The child also understood that if her sugar was high, she might have to take the cupcake home and eat it later. She was WAY more comfortable with her diabetes than most adults with it!
I also sent home a reminder whenever I sent letters home about sending snacks for special occassions that reminded parents not to send nut products, etc. With the nut allergy, if anything has nut/nut products in it, it goes back home with the child that brought it. No one gets it.
Last year, though, it took me, the child in my room (with diabetes), the school nurse, and the mom all working together. It worked out great.