Lightning is one of the most frustrating subjects in photography.
Think about it. You can't know where lightning is going to strike next. And you can't point your camera at the sky and push the button as soon as you see the flash; by the time the nerve signal gets from your brain to your finger, the bolt is gone, and there's nothing left to see in the picture except a lot of dark.
So the only way to take a lightning picture is to point your camera where you think the lightning is going to strike, and leave the shutter hanging wide open for as long as you can, and cross your fingers that the "Lightning Gods" will be kind to you with this storm.
You take black picture after black picture, while trying to keep your equipment dry, while trying to keep from becoming a target for the lightning yourself. And all the while, lightning strikes again and again--off to the side, where the camera isn't pointed...up in the clouds, where you can't see it...and directly in front of the camera--but while the camera is saving the previous picture and isn't ready for the next one yet...as if the lightning gods themselves are mocking you for even attempting to capture their glory on film...
...all of which makes lightning photography an exercise in frustration, patience, disappointment and persistence. Why? Why take picture after picture of the same tree hoping that a lightning bolt will strike behind it if your luck holds?
Because lightning shots are the ultimate in "one of a kind" photography.
Anyone can go to the same vantage point and get practically the same shot of the Grand Canyon.
Anyone can pose their kids in front of the same tree you found, or signpost, or playground. But lightning...those are truly one of a kind. Even in the extreme chance that some other photographer on the far side of town managed to get a shot of the exact same bolt...he still wouldn't get the same picture, because the bolt would curve differently, past a different background, with a different foreground...
...and it's that "one in a million" chance, the idea of getting a picture no one else could possibly get, that drags me out to my driveway, into a thunderstorm that woke me at 3am, with my tripod in hand, hoping for something more than black picture after black picture...hoping the lightning gods are kind that night...
It's actually a bit easier to shoot lightning with a 35mm than a digital, but in either case, the process is the same. You have to anticipate the lightning, and have the camera pointed "in the right place at the right time." Fireworks require exactly the same technique, but are a little bit easier, because it's easier to anticipate where the fireworks will explode--roughly the same vicinity as the last burst.
But for either, the trick is to hold the shutter open as long as your camera will allow. For a 35mm or digital SLR, this is the "B" setting. Use a tripod (don't even *think* of trying to do lightning or fireworks without a tripod), and a shutter release cable (so that you don't shake the camera once the shutter is open). Point the camera in the right direction, get your composition arranged the way you want, and set your aperture appropriately. The aperture is the F-stop, or how much light the camera is letting in to shine on the film, and the only way to find the "right" f-stop is trial and error. I would suggest starting at the extreme wide-open setting, and adjust accordingly. If there's a lot of "light pollution" (like shooting fireworks over a sports venue, with the field lights intruding on your perfect picture), then you might need to close down the aperture quite a bit.
Next, use the shutter release cable to "lock open" the lens. Leave the lens cap on until the fireworks launch, or until you think a lightning bolt is about to strike. Then, remove the cap. You could also get a sheet of black paper or cardboard and hold it in front of the lens, instead of fiddling with the lens cap. After the burst--or after a set amount of time waiting for it--cover the lens again, release the shutter, and advance the film.
With a digital point and shoot, there's more work involved, because most of these cameras don't have a "B" setting. Most of the rules will still apply, but you have to count more on luck. A lot more, actually. You'll need to set the shutter to stay open as long as possible (on my camera, this is fifteen seconds). Point it in the general direction of the storm, where you think the most bolts will hit...and then shoot a hundred frames of black. This is the photography slot machine, shooting picture after picture after picture, and hoping that a lightning bolt will hit, in the camera's field of view, during the short period when the shutter is actually open, and not during the annoyingly long space between pictures when the camera is saving the data to the chip and clearing out memory in preparation for the next picture.
Expect one lightning bolt shot for each 50 wasted pictures, during a particularly active storm; and expect one spectacular lightning shot out of ten bolts...
...if the lightning gods are smiling upon you.