The living daylights
A person's eyes; more recently, the life force or consciousness.
The release of the 1987 film The Living Daylights, the fifteenth in the James Bond series, reawakened usage of this old phrase. When we refer to someone having the living daylights beaten, scared, or knocked out of them, we just mean that they have been badly beaten or scared, or knocked unconscious. The imagery is of someone being so discomfited as to lose the power of sight. Like similar examples, such as 'beat the stuffing out of', the phrase is often used with an air of exaggeration and not always meant to be taken literally.
The original 18th century meaning of 'daylights' was quite specific and literal; it meant 'eyes'. That meaning has now long fallen out of use. The word was occasionally used to denote other items to do with seeing - spectacles, windows etc. (see daylight robbery), but usage of 'daylights' was largely limited to the eyes and to threats to close them by force. The first known citation of the word is one such example, in Henry Fielding's novel Amelia, 1752:
"Good woman! I don't use to be so treated. If the lady says such another word to me, d--n me, I will darken her daylights."
Francis Grose, in A Classical Dictionary of the Vulgar Tongue, 1796, reinforces the pugilistic usage:
"Plump his peepers, or daylights; give him a blow in the eyes."
The 'eyes' meaning of the word was going out of use even in the 19th century, hence the emergence then of 'knocking or beating the daylights out of someone'. The phrase is intended to indicate a severe beating, but perhaps not quite that severe. There was also a later variant of the phrase - 'beat the living daylight out of...'. When referring to eyes, 'daylights' makes sense, whereas the singular 'daylight' doesn't, again indicating that the link between 'eyes' and 'daylights' was becoming defunct.
The first usage of 'beating the daylights out' that I can find is in Augustus Peirce's poem The Rebelliad, 1842:
The people used to turn about,
And knock the rulers' daylights out
By the time that the intensifier 'living' was added, the phrase had lost all association with eyes. The earliest known version of that form was printed in several US newspapers in the 1890s, for example, The Decatur Morning Review, September 1890:
"'I'm not going to be insulted by a miserable rabbit', and he started to club the living daylights out of the beast with his gun."
The 20th century version of the phrase is the American 'punch someone's lights out'. The precursor to this form of the phrase was a widely syndicated newspaper report of the 1956 fight between Sugar Ray Robinson and Carl (Bobo) Olson:
"Robinson's knockout punch turned out the lights for Bobo in the second round."