Why is my camera not working?
From another user's experience on the Apple Support Community Forum:

Try this:


Go to Settings > General Reset
Tap Reset All Settings


Although this won't erase content on your device, you'll have to reset WiFi settings and sign in to iCloud again along with other custom settings.

Quote:


  I was able to get the camera to work again!
  go to Settings, General, Reset and tap Reset All Settings.
  This won't erase everything but you'll have to set up your WiFi and sign in to iCloud again.


EDIT If the above suggestions along with resetting the phone etc. doesn't help, one would be advised to take the phone back to Apple or an Authorized Apple Service center for testing.  Depending on the age of the device, they may cover repairs under warranty.