The OED says this slang is now especially used for skateboarding and surfing, and the first quotation is from a 1983 UNC-CH Campus Slang by the University of North Carolina, Chapel Hill:
Sick, unbelievably good: The Fleetwood Mac concert was sick.
The Concise New Partridge Dictionary of Slang and Unconventional English (2007) says:
bad adj 1 good; tough. US, 1897.
sick adj ... 6 excellent; wonderful. On the principle that BAD means 'good' US.
Partridge notes bad is much older, and the OED gives the source as George Ade's story of a black shoeshine boy, Pink Marsh : a story of the streets and town (1897):
She sutny fix up a pohk chop 'at's bad to eat.
It says its originally US slang and means something good or excellent, especially stylish or attractive. The later quotations trace its use through black and jazz slang (1928, 1955, 1959, 1971 and 1989) until more 'mainstream' use is noted in a US newspaper in 1995 and a UK book in 2006.
The OED has another similar meaning of bad which is originally African-American and used of a person who is so dangerous they inspire admiration, or impressively tough, or especially formidably skilled. The earliest quotation is from 1843 but only meaning dangerous or hostile without admiration. Their next earliest is in 1938 in a musical context, as are some of the others, and I can see some overlap of these meanings.
A Dictionary of Slang and Unconventional English (2002) gives a possibly unrelated term using sick, but it's somewhat similar:
In knock (one) sick, to astound, 'flabbergast': coll.: - 1923 (Manchon).