A post from Microsoft showed up in my Facebook news feed that compares photographs taken with an iPhone 5, Samsung Galaxy S3 and a Nokia Lumia 920. Microsoft's phone is clearly the winner with the best photo by far. You can see the results here for yourself. There aren't any details of how, why or when the photos were taken and a Microsoft test in which the Microsoft product won (OK Nokia make the hardware), is a little bit suspect.
You can see another test of these three phones here and the results are different. I would place the iPhone first, Samsung second and Nokia third. The iPhone photo looks more natural and the Nokia photo looks like it has had some processing like smoothing or something.
I have have never tried the Nokia, so I can't say what it is like. However, I do have an iPhone 5 and Samsung Galaxy S4 and have used the iPhone 4 and Samsung Galaxy S2.
I have't run any lab tests and I haven't specially set up photos to analyse the difference. I simply use them in every day life to take photos when I am out, with the family, on holiday and so on. Some shots on the iPhone are brilliant, but on the whole I have to say it is a bit disappointing because some shots are poor. It just seems a bit hit and miss. Sometimes you don't have time to set up a shot perfectly. You see something and you get out your phone and take a shot as fast as you can before the moment passes. Sometimes the iPhone messes up.
The Samsung Galaxy S4 seems much better when I'm fumbling with the phone, trying to work the controls and take a shot. It just seems to take lovely photos most of the time. Even the Samsung Galaxy S2 seems to take better shots than the iPhone 5 on many occasions. I know my tests are completely unscientific and they aren't even tests. They're just everyday shots. The Samsung simply makes me a better photographer.