I suggest these steps of our article named iPhone: Hardware troubleshooting http://support.apple.com/kb/ts2802.
- Ensure the camera lens is clean and free from any obstructions. Use a microfiber polishing cloth to clean the lens.
- Third-party cases can interfere with the autofocus/exposure feature and the flash (iPhone 4 only); try removing the case if you have image-quality issues with photos.
- Try turning iPhone off and then back on.
- Tap to focus the camera on the subject. The image may pulse or briefly go in and out of focus as it adjusts.
- Try to remain steady while focusing:
- Still images: Remain steady while taking the picture. If you move too far in any direction, the camera automatically refocuses to the center. Note: If you take a picture with iPhone turned sideways, it is automatically saved in landscape orientation.
- Video: Adjust focus before you begin recording. After recording begins, you cannot readjust focus until you stop recording. Exiting the Camera application while recording will stop recording and will save the video to the Camera Roll. Note: Video-recording features are not available on original iPhone or iPhone 3G.
As a last resort you can restore the iPhone as well. IF all that does not resolve it then it is not a software issue that can be troubleshot.
iTunes: Restoring iOS software