We are not sure if this is a bug or a feature but if you try to push the power/sleep button for three times in a row on the lockscreen, the iPhone goes right into flashlight mode showing bright white screen. I have also tested this and it appears to be working on iPhone OS 4 Beta 4.
Apple has just released the first developers preview version of iPhone OS 4 Beta, along with SDK for iPhone and iPod touch. Only members enrolled in the iPhone Developer Standard or Enterprise Program can access these bits of iPhone OS 4 and SDK by signing into Apple Developer Connection.