This article is from the Pyrotechnics FAQ, by Hans Josef Wagemueller firstname.lastname@example.org with numerous contributions by others.
Chances are that many of the procedures involved in pyrotechnics are
illegal without a permit where you live. There are generally separate
laws regarding storage of chemicals, manufacture of fireworks,
manufacture of explosives, storage of fireworks, storage of explosives,
use of fireworks and use of explosives.
The laws regarding fireworks may also be split up in terms of the "Class"
of fireworks concerned - commonly available fireworks are Class C, while
the fireworks typically seen at displays will be mainly Class B, with
some Class C. Make sure you know where you stand in terms of the law in
your area, and get a permit if necessary.
Make sure that what you are doing will not cause any damage to other
people's property, and that there are no innocent bystanders that can get
hurt. There are plenty of laws relating to injury or damage to third
parties and their property, not to mention lawsuits. We don't want anyone
to get in trouble with the law because of anything here.