When I first saw this painting a few years ago at SMU's Meadows Museum, I thought it was some kind of spoof. Surely the sunglasses were an anachronism in a Baroque painting.
But, no, Jusepe de Ribera's Portrait of a Knight of Santiago is a legitimate 17th-century work. The Meadows website explains that the "large ebony spectacles are of a fashionable type sometimes worn by upper class Spaniards. Besides adding concentration to the sitter’s already imposing gaze, the spectacles offered Ribera an opportunity to capture the subtle interplay of shadow and reflection in the lenses as well as a glimpse into the sitter’s personality."
The history of sunglasses seems under-researched. This dubiously sourced article seems to be the Ur-text of most online histories, but even this seemingly more reliable one suggests that tinted lenses date only to 1752, a history contradicted by de Ribera's painting from more than a century before. But there seems to be a consensus that they only caught on in the early 20th century.
Why did it take so long? Were there manufacturing and cost barriers? Or did hats and veils provide the physical and psychological protection that now come from shades? If you know more, or can point me toward good sources, please leave a comment or send an email to vpostrel-at-deepglamour.net.