"If one end of the flash LED makes contact with the case (shorting to ground), then that can cause the LED to stay on 100% of the time. You can open it up and repair it with this guide.
If that doesn't work and you still have the warranty I would just take it back to the Apple store.This is not an uncommon manufacturing defect, and I imagine they will replace it with no questions asked."
"Not having the know how to open up an iPhone and do the fix described here, i tried pushing the flash hard with my thumb and bashing the phone on the desk, cave man style! This turned the flash off!! Unfortunately a second bash turns it back on again. But at least i have confirmed the fault and have a (temporary) solution.
(I tried a system restore on the phone first, but the light didn't even go out during the process)"
"The repair mentioned in this link works like a charm. Easy breezy and I've done it twice. I used electrical tape, and had to repeat after a few months as it slid around, second time I used two layers and did a better job.