The expression “to beat the living daylights out of someone” means: To beat severely; flog unmercifully; lick the stuffing or tar out of one, or many other synonyms for thrash, punish, chastise.
All these indicate severe punishment that is to be administered to a foe or even to a son, but none is so drastic as the original and less verbose threat.
That is, back in the late eighteenth century or, most probably earlier, one threatened “to let daylight into” someone, usually a foe.
This was, or was to be, accomplished by means of an opening made into his system by a dagger or sword or other sharp-pointed instrument or, in later times, by a bullet. But such actual punishment bore attendant risk of reprisal by law, so the threats became more moderate.
One was less likely to swing for merely thrashing a person, and, certainly, “living daylights” could not be interpreted as a threat of death.
The suspicion is that the modified phrase is of American origin, dating back perhaps seventy-five years.