There was a plan to go and find instances in folklore to provide some sort of evidence of source material for why these creature should turn to stone. but instead I am not going to cite anything because this is a blog and I can do what I want.
Goblins
Obviously, right. They are goblins. The more weird and folkloresque they are the better. There is also a famous Dutch fairy tale about goblins turning to stone in the sun.
Trolls
Bugbears
First of all they should have pumpkin heads cause that's weird. And, if they have pumpkin heads then they should have weird spooky folklore properties. And turning to stone in the sun is one of the weirdest spookiest folklore properties a spooky monster can have.
Sea Hags
Yeah dude, they are all wet and gross. They totally dry out and turn to stone in direct sunlight. I imagine this as more like Dracula in Bram Stoker's Dracula like they can be out in limited sun and in the shade but if they are exposed to the sun at noon then they will turn to stone.
Beholders
This is probably because I have sensitivity to sunlight; so it makes sense to me that something with a bunch of eyes would be sensitive to sunlight. The idea of having all those eyes and no sunglasses seems like agony to me. So yeah theses things should turn to stone.