The "white light" next to the camera is the LED flash. Leaving it on for a long period of time will cause the device to heat up significantly.
Is your iPhone jailbroken? Do you have a tweak that uses buttons to turn on a flashlight? Need more information. The flash doesn't just magically come on for no reason.
I'm assuming it won't turn on because it's overheated. If you let it cool down (the LED flash will need to be off...) it should turn back on without a problem.