Apple didn't do much to the iPhone's camera from the 4S to the 5. Then again, it didn't really have to.
The iPhone 4S has one of the best cameras on a smartphone, and with some improved processing and other enhancements, the iPhone 5 does now, too. But it's not the only mobile device with a good camera built in, with the HTC One X and Samsung Galaxy S3 offering up some strong competition.
All three devices use an 8-megapixel. Basically, the benefit of BSI CMOS sensors over regular CMOS sensors is that their design allows more light to reach the photo diodes, which means less light is needed to get a properly exposed photo. The result is better low-light photo quality. (Keep in mind, though, that just because they all have the same sensor type, doesn't mean the sensors are of the same quality or the image processing will be identical.)
To further help out in low-light conditions, all of the models have large apertures; the iPhone has an f2.4 33mm lens, the Galaxy S III has an f2.6 27mm lens, and there's an f2 28mm lens on the One X. Brighter lenses let in more light, so there's less of a need to use higher ISO sensitivities that introduce noise and kill detail.
All three of the cameras have very good shooting performance with no or low shutter lag and fast shot-to-shot recovery, so you're never really left waiting to take the next shot.
Shooting options are pretty basic for the iPhone 5 with no controls over things like ISO or white balance, but you do get HDR and the new panorama mode. The Samsung and HTC, on the other hand, are closer to using a standalone point-and-shoot, with different scene modes and more control over results (though I doubt these things will matter to most people) and they, too, have HDR and panorama modes that essentially work the same as the iPhone's.
I hesitate to pick an overall winner here -- my time shooting with all three was brief -- but when it came down to picture quality, the iPhone 5 regularly produced excellent photos regardless of lighting. The One X is a pretty close second, however, turning out photos with nice color and detail. The Galaxy S3 turns out very good pictures, too, but they're not as usable at larger sizes as the iPhone 5's. (You can take a look for yourself in the slideshow above.)