If you're looking directly into very bright light then you will still be able to see the light somewhat through your eyelids (like on a sunny day if you're in a car going under trees and close your eyes, you'll still be able to see the flashes of light as you go in and out of the shadow of the leaves).
Human skin is translucent, not fully opaque, that's why if you shine a torchlight through your ears the light seems to make your ears bright red.
I have light colour eyes and am very sensitive to light, I would probably die without my eyelids lol.
Also like others have said, eyelids aren't just for blocking out light, it's to protect against other objects, eyelashes are commonly thought to have evolved to catch sand and fur and the like before it gets in your eye. Also we live on a ball where there's another ball made of explosions in the sky that will burn our eyes out if we look at it for more than a second and that thing moves, so it's very easy to accidentally look at it. Being able to regulate how much light you get by squinting is basically nature's sunglasses.