Respuesta :

When you are in the a dark room, the iris in your eye widens and your pupils dilated or gets bigger to allow as much light as possible in the dark room, thats why when you enter a room its completely dark then all off a sudden you are able to see a little bit in the dark, that's why.

In the bright light aka outside while it's sunny outside, the iris gets small and the pupil gets smaller.

Your eyes do this because when you are in a bright room, the brighness (like the sun) could damage your eyes, this is very different from the dark room because there isn't any bright that could damage your eyes. That's why when you are in a dark room for a long period of time then walk outside your eyes hurt that's because you eyes have gotten use to the darkness and you unexpectedly walked into a bright sunny room.

Hope this helped :)
Have a great day

In a dark room, the pupil expands to see as much light as possible, in order to make out your surroundings. In bright light, your pupil shrinks to avoid damage to the eyes from sudden exposure.