mid-14c., "by chance or accident;" late 14c., "by good fortune, luckily," from happy + -ly (2). Sense of "in pleasant circumstances, with mental pleasure and contentment" is from 1510s. Happily ever after recorded by 1825.
late 14c., "lucky, favored by fortune, being in advantageous circumstances, prosperous;" of events, "turning out well," from hap (n.) "chance, fortune" + -y (2). Sense of "very glad" first recorded late 14c. Meaning "greatly pleased and content" is from 1520s. Old English had eadig (from ead "wealth, riches") and gesælig, which has become silly. Old English bliðe "happy" survives as blithe. From Greek to Irish, a great majority of the European words for "happy" at first meant "lucky." An exception is Welsh, where the word used first meant "wise."
Happy medium "the golden mean" is from 1702. Happy ending in the literary sense recorded from 1756. Happy as a clam (1630s) was originally happy as a clam in the mud at high tide, when it can't be dug up and eaten. Happy hunting ground, the reputed Native American paradise, is attested from 1840, American English. Happy day for "wedding day" is by 1739; happy hour for "early evening period of discount drinks and free hors-d'oeuvres at a bar" is by 1961, said to be 1950s. Rock-happy (1945) was U.S. Pacific theater armed forces slang for "mentally unhinged after too much time on one island." Related: Happier; happiest.
common adverbial suffix, forming from adjectives adverbs signifying "in a manner denoted by" the adjective, Middle English, from Old English -lice, from Proto-Germanic *-liko- (cognates: Old Frisian -like, Old Saxon -liko, Dutch -lijk, Old High German -licho, German -lich, Old Norse -liga, Gothic -leiko); see -ly (1). Cognate with lich, and identical with like (adj.).
Weekley notes as "curious" that Germanic uses a word essentially meaning "body" for the adverbial formation, while Romanic uses one meaning "mind" (as in French constamment from Latin constanti mente). The modern English form emerged in late Middle English, probably from influence of Old Norse -liga.