When my second girl was about 4 or 5, we started to notice that her crazy behavior was sometimes totally out of the blue, rather than the result of poor sleep, inept parenting, or general disorganization, as I was first inclined to believe.
One Sunday, my husband bought bagels and strawberry cream cheese for a fun breakfast. It was a nice relaxed morning, and we got ready for church. By the time we got in the car this child was sobbing uncontrollably, screaming about how she hated her (favorite) shoes, hated everything... we looked at each other and I asked what was in that cream cheese, because I had a theory about dye in candy. When we got home and looked at the label, sure enough, that just-right pink color was from dye, not essence of strawberry.
So we were careful, and started reading labels. Red dye was in things one wouldn't expect, like chocolate cake, and sauces.
Years later, we were careless, she had a sundae at Chick Fil A, and broke out in hives after she ate the cherry on top. When I looked up the ingredients later, it turns out that lots of soft serve has food dye to get just the right color of "white" for vanilla.
If she snuck candy at a party, she would come home tired and out of sorts, go to sleep, and wake up cranky with a headache in the morning. Then we had two experiences where we bought meat from a lower-end grocery store, and she woke up with a splitting headache - so bad that she threw up a few times, like a hangover! This was actually the ideal experimental control because I didn't realize the meat had dye until I saw the symptoms and checked back.
By this time she was 9 or 10 and willing to ask friends and read labels to avoid a food dye hangover. It was a blessing that she had no more hives, and the headache was an awful enough ride to convince a strong-willed child to pay attention.
She also seems to have more challenges managing her mood and behavior with chocolate and lots of dairy, so chocolate ice cream at night is a no-go for now. The other kids help make the connections with anything I might not notice, and this has been clear enough to make a rule about it.
Even though food dyes aren't great for anyone, it's fascinating how variable people are in their responses. I've learned a lot. The toddler seems to have some of the same features, and of course we've been quicker to notice.