We understand just how much our customers love their iPhone cameras, so we can understand how annoying it can be should it decide to stop working. Quite often iPhone users don’t realise they have certain restrictions turned on, hindering the usability of the camera. Try this fix to resolve it:
Settings > General > Restrictions > Check the “allow camera” function is turned on. If it is already turned on, try turning it off and on again.
If this doesn’t work you can try restoring your iPhone in iTunes, but make sure you’ve backed up your data beforehand.