You have faced the Bad Sun event. In a nutshell, here's a breakdown how to survive it:
- Avoid going outside or looking anywhere outside
- Try to sit in isolated places where there are no windows and with a closable door (the workstation room is bad)
- The primary room is getting blasted with the sun at evening, avoid it
- If the sun could be reached with your POV, you will turn to it and start taking damage (go behind cover, looking away does not help)
- Try to conserve as much stamina as possible.
The break room (the room with the couch) and the storage utility closet are two, viable hiding places away from the sun.
However, its not scripted. There are stories of people getting Bad Sun twice in a row. Its a chance every day, might it be the bad light or not.
If you could, you should grab the pieces of flesh and bring them back for food. Might it be cannibalistic, you've got yourself some free food! Sometimes it can grant you stamina if you eat enough of it. It can also regen the lost health. In any case, use a medkit (or anything else that heals) if you can't reclaim your stripped flesh away.
Surviving Bad Sun grants you a new gamemode "Solar". "Bad sun at day and avoid "Them" at night."
"Them" - are actually wisps that rip your body parts apart. Your legs, hands, detached. Pretty cruel way to die, even more cruel than the bad sun itself. But remember, you can't beat them, but they can beat you.