Where did the slang usages of "cool" come from?
The Oxford English Dictionary writes:
Originally in African-American usage: (as a general term of approval) admirable, excellent. Cf. hot adj. 12c. Popularized among jazz musicians and enthusiasts in the late 1940s
The first example they give is from the 1930s:
1933 Z. N. Hurston in Story Aug. 63 And whut make it so cool, he got money 'cumulated. And womens give it all to 'im.
The entry refers to hot as a comparison--the main entry is "Characterized by intensity or energy, in a positive or neutral sense (cf. sense A. 9); exciting, fast, successful, etc." and the related sense is:
colloq. (orig. U.S.). Extremely good, splendid; very skilled, knowledgeable, or successful. Also with on and a specified subject or activity.
This is first noted from the 1800s:
1845 in G. W. Harris High Times & Hard Times (1967) 52, I am a hot hand at the location of capital letters and punctuation.
So, it looks like cool developed to mean the same thing as the earlier slang hot in African American English. There is no explanation of why this occurred.