BRIEF SUMMARY: I had this problem with my iPhone 5 and I solved it by having the camera/flash unit replaced for $65 at a repair shop
LONGER VERSION: I updated my iPhone 5 to iOS9 several weeks ago. After a few weeks of normal use, I experienced the same problem described by others in this thread (rear camera and flashlight stopped working). I read all posts in this thread, and many others, looking for solutions. I tried everything in this thread, and from other sites (including all sorts of button-press and restart combinations; different types of restores; physically pressing on the rear camera, etc.). None of these things worked.
I went to a local repair shop (I googled "iPhone repair" in my city; there is no apple store near me). The repair shop replaced the rear camera and the flash (apparently they come as a unit). It cost $65 plus tax, and the repair took a few hours. The technician speculated that a short that was affecting both the camera and the flash. Everything is working perfectly now. The technician changed only the camera and flash hardware, not the software.
My assessment: I think my camera/flash unit broke, and that the upgrade to iOS 9 was coincidental.
With $65 spent, my phone is back to normal. Considering that I've owned my iPhone 5 for three years, and taken a huge number of photos, I suppose it shouldn't be disappointing that it would need replacement.
Clearly some people on this post have a different problem, because restoring the phone fixed the problem. If you have this problem, and if the solutions presented in this thread don't work for you, perhaps you need to have the camera/flash unit replaced in your phone. I speculate that this problem is NOT related to a software upgrade; it is coincidental that some of us have had this problem after a software upgrade, and many of us experienced the same coincidence because of the large number of iPhones on Earth.