A common question we hear is, “Can my iPhone flashlight burn out?” The only way your iPhone flashlight will stop working is if the iPhone battery dies, and then only until you charge the iPhone back up. You don't need to worry about the iPhone flashlight burning out.
How long can you keep iPhone flashlight on?
The iphone generally stays on for a maximum of 1 to 2 hours.
Is it bad to keep iPhone flashlight on?
Long-life low-power LED lights make best use of limited battery resources. I would avoid using your iPhone's flashlight overnight. Its battery life could suffer for so many cycles of charging.