I've seen a few iOS apps that allow you to take photos in dim lighting conditions, but none so far are as well thought out or feature rich as NightCap Pro (US$1.99).
The app, which supports both still photos and video, puts your camera into enhanced modes that really improve low light performance. NightCap Pro also features grain reduction, always a problem when shooting in low light, and a Light Trail Mode for getting good images of light painting or even star trails.
The onscreen displays are extensive, and when you first use the app you'll get a tour of what the icons mean. You can lock exposure, focus (critical at night) and white balance. There is a self timer and also a burst mode, with adjustments for the amount of noise reduction. Add too much and the image gets soft, so having an adjustment is a good thing. Photos are saved at the full resolution of the camera for stills. For video, resolution is lowered for Night Mode.
I gave the app a try in my generally dark neighborhood. We have no street lights overhead; just exterior house lighting. The photos (see the slide show below) looked quite good. I could even see some bright stars in the image, not something I am used to seeing in an iPhone shot. I didn't try star trails, but I've seen some samples taken with the app and they were impressive.