It is not an allergy, it is a toxicity. It poisons them. Depending on the type of chocolate and the size of the dog the symptoms vary. Dark chocolate and baking chocolate are worse then milk chocolate.
Dogs can be allergic to chocolate due to the presence of a substance called theobromine. This substance is found in all forms of chocolate, including cocoa, cocoa powder, and dark chocolate. Theobromine is a mild stimulant that is toxic to dogs in large quantities and can cause symptoms such as vomiting, diarrhea, increased heart rate, seizures, and in severe cases, death.