Why did he weared (sun) glasses so often?

Was this for medicial reasons or just part of his style?