I went for the iPhone 4S which I think is in the same ballpark as the Samsung Galaxy S2.
In terms of megapixels, it is quite plenty. In terms of image quality of the lens, it's acceptable. The ISO performance is a bit worse than even a basic P&S, and you have no optical zoom.
For personal use, I have gotten good utility out of my iPhone, especially if I see a poster for an upcoming activity and want to remember the date / location / etc, you just snap a picture of it and move along. At family parties and other such events where you might not always have a real camera with you, it's better than not having any camera. If I can, though, I tend to bring a Canon S90 along (or have my wife put it in her purse), because it offers full manual settings, and is a bit better in darkness with a f/2.0 lens and slightly less bad mid-ISO performance.
But if you want to compare it to a Nikon D40 from 2006 and the 6.1 megapixels it provided, I've never played around with one, but I would definitely favour the D40.
To sum up, if you have enough light, and don't mind the constant focal length of the cell phones, you can take decent pictures / 1080p videos with them. The videos should be good enough to put on Youtube, but the pictures probably not good enough to use in most contests. When the light starts to fall off, it's usually not even worth taking a picture.
An iPhone 4s at 800 ISO and a Nikon D4 at 256000 ISO would probably be in the same ballpark for noise grain.
Cameras: Canon EOS 6D, Canon EOS Rebel T3i, Canon EOS Rebel T2i, Canon S90
Lenses: Tamron: SP 24-70mm F/2.8 Di VC USD, SP 70-300mm F/4-5.6 Di VC USD, Rokinon: 8mm Fisheye cine, Canon: EF-S 18-55mm f/3.5-5.6 IS Lens, 75-300mm f/4.0-5.6 III, and EF 50mm f/1.8 II
Retired camera: Fujifilm Finepix s700