Anterior uveitis is an eye disorder that one community of fans advanced as being the cause of Otto wearing his sunglasses at all waking hours of the day and night. It is an inflammation of the tissues in the front side of the eyeball, including the iris, aggravated by exposure to bright light. Management includes treatment with local steroids, as well as protection from bright light. Properly treated, the patient over the course of a few years recovers completely with normal vision.
Otto has never bothered Sam for wearing glasses. We see Otto without his shades primarily at night while he is in bed, or cleaning his shades, or using other eye-protection like snowgoggles or a diving mask. Also, in the episode Merv Links to Otto, the first thing Otto does when Raymundo awakens him is to put on his sunglasses. Also, Otto wears sunglasses at night in Night Prowlers.