The idiom “a sight for sore eyes,” meaning a welcome and pleasant event, appears to date back to at least the 1700s, although it may have been used earlier. As is often the case with well known idioms, the phrase has been borrowed by industry, as a casual survey of optometry offices will reveal. Many people continue to say that something is a sight for sore eyes colloquially, although they may be unaware of the roots of the phrase.
”Sore,” in this particular case, refers to being tense, fearful, worried, or sorrowful. While this meaning of the word in English is no longer widespread, during the time of the King James Bible, it was a commonly accepted usage. Since the King James Bible was one of the earliest official translations of the Bible into English, it can be assumed that many of the word usages in the Bible reflected common usage, since the intent was to make the Bible accessible for all. During this period, many people wrote and spoke of things like being “sore afraid,” for “extremely afraid.”
In this sense of “sore,” a sight for sore eyes would be something which brings about relief from tension or fear. Jonathan Swift appears to have been the first person to use the term in print, in 1738, writing that “the sight of you is good for sore eyes.” His casual usage of the term suggests that it was probably a well known phrase in the England of the period, so it may have been in use for decades previously.
Over the years, Swift's words have been shortened, with most speakers redacting the “good for,” and turning the idiom into "a sight for sore eyes," with the meaning remaining the same. There are a few exceptions; some people use the term in the negative, suggesting that the sight in question actually brings about sore eyes. However, this reversal of the conventional meaning of this phrase is relatively rare, and usually clear from context. Should you find yourself arguing about the phrase with someone who holds the belief that it has a negative meaning, you may want to point out that the good usage pre-dates the bad.
Optometrists who have co-opted the term may not be aware that the eyes in question are sore in the sense of fearful, rather than sore in the sense of painful. Likewise with people who have come up with clever puns involving homonyms for “sight,” such as “site” and “cite.”