Apple's iOS 4.1 update brought HDR photography to the iPhone 4 but left out the iPhone 3GS and brand new iPod Touch. Here are two ways to add HDR photography to your unsupported device.
The easiest way is to spend $2.49 on a little app called Pro HDR, which gives you a lot more control over the HDR images you create. It's worth a look, even if you're an iPhone 4 user, as Pro HDR lets you adjust the image after it's taken.
If you'd prefer to have the HDR option directly in the camera app and you've jailbroken your iPhone (or want to), you can download HDR Camera Enabler from Cydia via the ModMyI repository (instructions here).