The simple answer is yes. You just need to make sure your fireworks don’t get wet before you light the fuse.
If the ground is damp, it’s a good idea to lay the firework on a plastic bag before you fix it to a stake. (Most professional companies fix their cakes like this to make sure they don’t fall over or bounce around).

If it’s really wet, if rain or heavy dew is expected, you can place the whole cake inside a plastic bag before taping it to the stake. Rip open the bag just before you light the fuse. The firework will easily burst through the rest of the bag once it gets going.

But don’t cover rockets. They won’t burst through a bag. Just keep the fuse dry until the last minute.
And whatever you do, be safe. Follow the firework code. (Click here to see some sound advice from ROSPA.)
(Featured photo: Colby Stopa under a Creative Commons Licence on Flickr. With thanks)