I probably ought to have posted this a week ago. It seems that every year when I post a few photos of the fireworks display that my family and I go to watch I get asked how to shoot fireworks. I usually reply personally but thought others might be interested. This will be here for next year so you can look it up if you want.
There are a couple methods. Back in the film days I used to use a set formula, it was set times for certain ASA, on your digital it would be ISO. Here are the ones I used.
ISO 64 1/30th @ f2.8
ISO 125 1/30th @f4
ISO 400 1/60th @ f4.5-5.6
ISO 1000 1/60th @ f8
The various ISO chosen was because of the type of film available it changed a bit over the years as more film speeds became available.
(In the image above I held the shutter open and let the light streak until the little white explosions went off the let it shut. There were 4 bursts in that time. I was lucky that they were all the same color it made a great look.)
You could easily meter the scene if it was say a city and get the exposure you like and let the fireworks do what they do and that will look fine as well or even shoot on automatic as long you used the exposure compensation adjustment. I would start with a two stops underexposed and see how that looks. If not remember that meter in the camera will attempt to make the scene 18% gray so you will get a lighter scene that you probably want.
Lately I have been doing it all differently and a lot simpler. With digital we get to see our results so we can experiment a bit more and still get some good shots.
(In this Image I waited for the second burst and got lucky that it happened in the the middle of the first.)
I set the camera on Bulb or B. This will set the shutter to stay open as long as the button is pushed. Of course I use a tripod as this will be long exposures. I also use a release cable well it is not a cable anymore but electronic but the same idea. That way you can hold the shutter open without touching the camera and keep from giggling it.
The photographs I am showing here were shot around 160 ISO and f5.6 I only used 160 ISO because the particular camera I shot these with seems to prefer that ISO. The vertical shot was at 100 ISO and probably the same f stop. It really doesn't matter for the fireworks but lately I have wanted to get a bit of the crowd in the shot as well in keeping with the small town America theme.
(Again waited for the second burst which gave time for the first to trail down.)
So here is my complicated technique. When I hear the firework go off I either open the shutter then to get the trail or I wait and guess and just when it will explode after a couple that is quite easy. Then I hold the shutter open until I see what I want in terms of the fire works. I am sitting in a chair and not looking through the view finder as I have already set the camera to where I want it to see.
(I opened the shutter just as they were shot and held it open until all three burst.)
If I hear or see two launches I may wait until the second explodes and get that shot. If you wait and keep the shutter open too long you will begin getting jumbled mess. I prefer up to maybe three explosions at the most. There are techniques that you can keep the camera from advancing to the next frame and moving it a bit to fill up the frame with multiple bursts that I did sometimes with film but I find it easier to do that in post now although I don't ever really do that.
Well I hope this helps, sorry it was after the 4th but if you have any questions let me know and I will try and answer them the best I can.