Why did pirates wear eye patches?

Society Trivia Question: Why did pirates wear eye patches?