In general, newborn babies can open their eyes when they are born out, because they have been looking around in mother's tummy for about 15 weeks before boring out. However, they could not see objects clearly and you would feel they are staring at one objects always. Because they need about one week to adapt the light and dark by themselves. At the same time, they could adjust the short distance, usually 15cm in their eye vision to make both eyes work.
Actually, babies will open their eyes not long after they are given birth to. Because their eyes are too small, you find it hard to see their small eyes and think they close the eyes. If the baby doesn't open the eyes after about three hours after she or he is born out, you should ask the doctor to check his or her eyes.
Yeah, you are right. Some of them closed their eyes when the baby born, but the eyes some of the new babies are wide open when you are seeing the new world the first time, because they have been looking around in mother's tummy for about 15 weeks before this. If the eyes of the baby are closed when he is born, as usual, it will not take long time to open his eyes because he also wants to know the new environment. If you just put the baby in the room, he will open his eyes within a few days. However, when you put the new-born baby under the sunshine or the strong light, the baby will squint or turn away from the light which will make his eyes feel uncomfortable. If you always see the baby's eyes are closed, that does not mean he do not open the eyes, instead that is just because the baby are asleep when you see.