There's a chemical in chocolate called Theobromine there's also caffeine in chocolate, if a dog eats too much it can cause muscle tremors and seizures.
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.