The black bandage on the eye was used by pirates to quickly get used to changing lighting. Actually, not only pirates wore such bandages. Any sailor who needed to frequently visit the hold, wore a bandage on his eye. The reason was that the ocean, illuminated by sunlight, blinded the eyes, but it was very dark in the holds. In order not to waste time on getting used to changing lights, one eye was kept in constant darkness by the sailors, and when they went down into the hold, they opened it and immediately saw it well.

For the same reason this was a practice amongst military pilots too during a thermal nuclear exchange. These were in addition to special flash blindness goggles in case these failed, the idea being that one eye would remain useable.

More Info: www.childrensmuseum.org