Shot from a private boat watching fireworks as the clock strikes 12 midnight on December 31st in San Diego, CA.
Fireworks can be difficult to photograph. Any time you are shooting in an environment with such drastic contrasts between dark and light, you have to be extremely careful with exposure.
Lens selection is vitally important. Having a lens with an aperture that opens allowing the maximum amount of light through the lens is helpful in many low-light situation, but fireworks is not one of them.
The reason is that as you open a lens up, you greatly limit the depth of field - the area in which focus can be achieved. You need a good amount of depth of field to capture fireworks because they are usually large events (some explode into areas over 100ft wide) and typically you are going to be a pretty good distance from them.
Regardless of the lens, I use an f-stop of f11. This gives one the DOF required to shoot large - distant events.
ISO is important as well. The higher the ISO - the more exposure in low light - the more noise/grain the image has. You want to stay with a lower ISO - I typically don't go above ISO 800 with my Canon 5D MK2. This will provide enough detail without grain that I can adjust exposure in CameraRAW without loosing too much detail.
Lastly, shutter speed becomes very important because you don't want to end up with blurred images from camera shake.
There's an old rule of film photography called "The Hand-Held Rule" that lends itself to digital photography with great results. The rule is - you shutter speed should never be less than the focal length of the lens.
So if you are on a 300mm lens. Your exposure needs to be 1/300 sec or greater. I shot this photo with a 28mm lens. That means so long as I didn't set exposure for less than 1/28th of a second. I shouldn't have had issues with blur.
Using a wider lens allows you to use a slower shutter speed without adding the risk of camera shake blur defects in your images. And with events such as fireworks, wide lenses also allow you to capture larger areas of the environment so the viewer of the final image(s) can see the context to which the fireworks were witnessed. I've seen some beautiful shots of fireworks in the sky, but they were shot on longer lenses and therefore no ground or surrounding areas were included in the images, so you loose the scale and reference of just how big or bold the fireworks might have been.