When did the expression 'shiner' first appear in print?
Robert Chapman & Barbara Kipfer, Dictionary of American Slang, third edition (1995) may be the source of Etymology Online's origin date of 1904 for the slang term. In any event here is that dictionary's entry for the term:
shiner 1 n by 1904 A bruise near the eye; =BLACK EYE, MOUSE: ... a pip of a shiner—John McNulty 2 n gambling by 1909 a shiny table top or other mirror-like surface a dealer can use to see the faces of the cards he deals
The 1904 origin date seems fairly accurate. A Google Books search finds a match from 1903, in a short story set in New York City's East Side and involving Eva Gonorowsky and other schoolchildren from recently immigrated Jewish families. From Myra Kelly, "A Little Matter of Real Estate," in McClure's Magazine (June 1903):
"Eva!" exclaimed Teacher, "oh, Eva, what can you have been doing? What's the matter with your eye?"
"Isidore Belchatosky he goes und makes me this here shiner," said Eva's accusing voice, as the eye under the poultice was uncovered for a moment. It was indeed a shiner of aggravated aspect, and Isidore cringed as it met his affrighted gaze. ..."
"Surely Isidore would never hit a little girl?" Teacher remonstrated.
""Teacher, yiss ma'an ; he makes me this here shiner. Sadie she goes und tells him she kisses him a kiss so he makes me a shiner. He's lovin' mit her und she's got kind feelin's by him, the while his papa keeps a candy cart. ..."
A second early occurrence is from "The Man Higher Up," in the [New York] Evening World (October 27, 1903):
"I have a friend who is in the business of painting black eyes. He can take a shiner the size of a walnut and, by patience and science, so disguise it that you wouldn't know it from part of a real face. Now, he tells me that business is picking up to beat the band.
How did 'shiner' come to refer to a black eye?
Surprisingly few reference works make any attempt to explain how shiner acquired the meaning "black eye."
One that does is Tony Thorne, The Dictionary of Contemporary Slang (1996):
shiner n a black eye. The word has long been used to signify something prominent or noticeable; it acquired this specific sense around the early 1920s.
Thorne's dating ("early 1920s") matches Eric Partridge's in A Dictionary of Slang and Unconventional English, fifth edition (1965):
shiner, ... 9. A black eye: Naval: since ca. 1920.
But both Thorne and Partridge are talking about when shiner meaning "black eye" first appeared in British English. John Ayto & John Simpson, The Oxford Dictionary of Modern Slang (1992) agrees with Chapman & Kipfer that 1904 is closer to the mark:
shiner noun ... 2 a black eye. 1904–.
One intriguing possibility for the origin of shiner as "black eye" arises in connection with the entry for shine in Gilbert Tucker, American English (1921):
SHINE, to have—To have one's shoes blacked, B[artlett, Dictionary of Americanisms, fourth edition (1877)]
The relevant entry in the fourth edition of Bartlett is as follows:
Shine. ... 3. To have a shine. To polish boots or shoes; to black boots. An expression used almost universally by the street boot-blacks.
Have a shine, boss?" said the owner of a stand, giving his chair a parting slap with his brush. "Shine 'em up in half a minute, sah. You'll jest have time to glance ober de mornin' papers." — Newspaper.
A similar account appears in "A Summer Story," in The Churchman (July 29, 1882):
"Shine?' inquired a brisk, business-like voice.
"Well, I don't mind if I do have a shine," said the taller of the two gentlemen, stopping to look down at his dusty boots. "Here, my boy."
While the little bootblack—and he was a little one—was getting ready for work, the two gentlemen began to talk again.
These references indicate that in the late 1800s—unlike today, when a typical shoeshine consists of nothing more than buffing shoes with a soft cloth—a "shine" involved applying bootblack to a shoe and then polishing the shoe. Given the connection between "shining" and "blacking," it doesn't seem far-fetched to suppose that a blackened eye might be equated with a blackened ("shined") shoe, and that people might refer to having a black eye as "having a shiner."
But if that is the origin of shiner, it happened without any recorded transitional phrases I could find, such as "shined [one's] eye." I also don't know what to make of the earliest Google Books match—the East European immigrant child patois of "makes me this here shiner" and "makes me a shiner." The English may be artificially mangled for humorous effect, or it may be a faithful attempt to replicate how shiner was used on the Lower East Side in the early 1900s.
The more likely explanation is that (as other posters have suggested) the bruised skin of a black eye reflects light in a noticeable way under certain conditions. One fairly strong piece of evidence for this view comes in the form of an article titled "The Girl and the Black Eye," in the [New York] Sun (June 21, 1903). That article uses the following terms for a black eye: "black eye," "lamp," "bum lamp," "window," "shiner," "purple one," "map," and "gleamer."
That black eyes, at the dawn of recorded usage of shiner as a slang synonym, were also known as windows, lamps, and gleamers is a strong indication that the reflectiveness or shininess of the skin's surface was the basis of the slang term. As for where the term first caught on, the fact that the three earliest instances of shiner that I could find occur in a story set in Manhattan and two articles published in different New York City newspapers makes the Big Apple the likeliest place of origin.
UPDATE (8/23/2017)
A slightly earlier instance of the expression occurs in an item originally published in the Washington [D.C.] Post and reprinted in the Omaha [Nebraska] Daily Bee (August 28, 1902):
Two men were standing on a Fourteenth street corner the other afternoon, relates the Washington Post, when they observed about half a block away one of their friends bearing down upon them. Even in the distance they could perceive in the bright sunshine that their approaching friend had a mighty visible and poignant looking case of black eye.
"There come Jim Highstep," said one of the men, nudging the other, "and look at the shiner he's got! Somebody must ha' handed him a poke. I'll bet you a pat dollar that the first thing he'll say when we remark on his bum lamp will be: 'Yes, but you ought to have seen the other fellow!'"
"That gives you too much the best of it," said the other, "but I'll lay you even money for a dollar that he'll hurl us some kind of a fairy tale to account for the shiner; that he fell upstairs in the dark; that he ran into a post; that he fell down, or something of that sort."
This instance pushes the earliest match that I've been able to find back by almost a full year, and it weakens the case for New York City as the geographical source of the expression. It also includes the intriguing sentence, "Even in the distance they could perceive in the bright sunshine that their approaching friend had a mighty visible and poignant looking case of black eye"—suggesting either that the darkness of a black eye may be evident from half a block away in bright sunshine or that the bruise from a black eye may catch the light in bright sunshine and appear shiny at that distance.