How to fix dark screen after locking iphone 4 ios6?
The algorithm for auto-brightness was adjusted significantly in iOS 6.

Rather than before where you would see an immediate change on turning on auto-adjust, now it's a more gradual process, and you can actually see the slider moving as it makes updates.

Also, another change is that the auto-adjust now works on the lock screen, so at night you won't be blinded, and in the day you can actually see the screen in day light.

Personally, I found it very annoying for about 2 weeks, and now I've adjusted to it, I find it works much better than before. If I want to manually control the screen, pointing it at a bright light causes it to brighten significantly, etc.

Finally, some sites have suggested that you can "tune" or reset it by turning auto-adjust off, setting the brightness to minimum, then turning auto back on.

Worth noting, that as I'd had to get my flashlight replaced right when iOS 6 came out, I actually assumed it had broken the ambient light sensor and I took the phone to the apple store because the auto-adjust switch didn't work as it had previously. The geniuses had no explanation for the new behaviour. I had to google it myself, and plenty of other people have complained about it.