I would recommend:
1.Try restarting the iPhone by "Sliding to switch off" and powering back on again
2.Please ensure a recent iCloud or iTunes backup is made/available before proceeding.
3.Try updating to the latest iOs if not running latest version
4.Close the Camera Application and re-launch again.
5.Reset All settings (Settings-General-About-Reset)
(Do not erase all contents and setting in the above step, all reset "all settings"
6.Restoring the iOs to factory settings and setup as new.
The next step is quite critical
7."Before" restoring any backup, try take a photo, if the issue persists on a factory reset device without the backup restored, you most probably have a hardware failure.
If the issue is resolved and the camera works: Try restoring from iCloud.
Call AppleCare for further assistance:
Hope this helps