Pirates, like other seamen of the time, might have worn eye patches to help them see when moving from a dark hold to the bright deck. No historic record exists, however, that confirms pirates wore eye patches regularly, other than in romanticized fiction and art.
The eyes adjust quickly when moving from darkness to light; but when going from light into darkness, certain photo pigments need to be regenerated. This process can take as much as 25 minutes when adjusting from bright daylight on deck to pitch-black dark in the hold. In the 20th century, this principle was applied when military pilots began wearing a type of eye patch in certain circumstances to protect themselves from temporary or permanent blindness caused by nuclear flashes.