With iOS 4.1, the Camera app in iPhone 4 comes with a new HDR (High Dynamic Range) feature which you can turn it on and off by tapping on a button while shooting. Dynamic range refers to how bright the camera can capture on on end, and how dark the camera can capture on the other end of spectrum. Most digital camera, iPhone included, has a limited dynamic range. HDR photography is an attempt to compensate for the limited range.
When HDR is turn on, you will notice that most often the result is a better image with more defined colors, with more details in the shadows and highlights. It is tempting to always shot with HDR as you can set the Camera app to save a regular copy along with the HDR version under Settings->Photos. But unfortunately each capture takes about 5 seconds to save, and HDR image might not show noticeable improvement in all cases.
One area where you want to turn on HDR is when capturing high contrast scene, where you have portion of very bright area and very dark area together in your picture. The above is an example with a backdrop of bright afternoon sun and tree leaves under shadow. With HDR on, iPhone 4 is able to capture the blue color of the sky.
Other example of high contrast scene include taking a portrait of your friend outdoor against a bright backdrop; Or a landscape scene with the sky as background.