c. 1200, "morally evil; offensive, objectionable" (other 13c. senses were "malevolent, hurtful, unfortunate, difficult"), from Old Norse illr "evil, bad; hard, difficult; mean, stingy," a word of unknown origin. Not considered to be related to evil. From mid-14c. as "marked by evil intentions; harmful, pernicious." Sense of "sick, unhealthy, diseased, unwell" is first recorded mid-15c., probably from a use similar to that in the Old Norse idiom "it is bad to me." Slang inverted sense of "very good, cool" is 1980s.
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.
<a href="https://www.etymonline.com/word/illy">Etymology of illy by etymonline</a>
Harper, D. (n.d.). Etymology of illy. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/illy