What?
As far as I've looked there is no visiblity evaluation based on light or shadows or anything in that regard.
There is no way to check if a flashlight is pointing at the player, or even if the sun is shining on a player, I couldn't even find a way to find where the sun is.
I can kind of use raycast to find if a player is in front of a flashlight myself, but I can't find if the player can see the sun.
Why?
There's plenty of things I could utilize this for, from reducing zombie visiblity in dark areas to adding a glint to a weapon scope whenever there's a light(or sun) shining onto it.
How?
Golden scenario:
A way to check how well lit is the player (or any object to that matter)
Silver scenario:
Check if player is in shadow/light or not
bronze:
Get Sun position command/function