I bought a flip cover with the view window and I remember on my S4 it had a light effect option in the unlock screen section. And therefore it would lock and unlock with the light sensor. On the S5 I cannot find it.
Can't really recall that feature from the S4. What I do know, however, is that the 'Light Effect' from the lockscreen did not refer to the light sensor in any way. It was the animation effect that would show up on your screen if you hovered your finger over it and when you eventually unlocked your screen. If the feature you're referring to existed, it would have been under Gestures settings (probably Air Gestures?) but not on the lockscreen ones.