The most common allergens are beef, dairy, wheat, egg, chicken, lamb, soy, pork, rabbit, and fish.
And, most dogs are usually allergic to more than one thing.
It's a multi-factorial thing, but certainly you have to have a genetic predisposition to develop allergies.
The environment can affect it, too.