Hmm I believe that it's done for sorts of eye tests before eye surgeries usually but I believe it's done by shining an extremely bright light into the eye which then compared to that light everything else seems extremely dark making the pupil really large