1. How early can we trace the use of slang "fire" meaning "cool" or "great?"
P3.... b. on fire... (b) fig. and in figurative contexts. In a heightened state of emotion or activity; inflamed with passion, anger, zeal, etc.; enthused; inspired. Later also (colloq.): on a run of success; performing at a very high level.
John Gower, Confessio Amantis (ante 1393), iii, l, 16:
Whos herte is everemore on fyre
To speke amis and to do bothe,
For his servantz ben evere wrothe.
which follows the use of 'fire' since Old English to mean (II. 13. a.) "a burning or ardent emotion; a strong feeling of passion, rage, love, etc."
Now, you probably understand both of those already and would reply, "No, no. I mean when did American kids start using it by itself instead of 'cool'? Y'know, like 'stupendous', 'whizzbang', 'copacetic', 'spiffy', 'keen', 'neato', 'swell', 'boss', 'groovy', 'dyn-o-mite', 'outta sight', 'rad', 'bitchin'', 'station', 'wicked', 'bad', 'phat', 'tight', 'sick', 'fly', 'a'ight', 'epic', 'sweet'..."
Obviously, what you have with 'cool' is the slang version of a euphemism treadmill: frequently in the US, African-Americans have some way to speak freely among themselves, white kids appropriate it (at which point black people need something new), and white parents pick it up (at which point their kids need something new). Even more, you get a TV show ('dyn-O-mite'), movie ('sweet'), or song ('bad') that blows up some usage that the year before needed glossing within a song.
In just this way, the Bloodhound Gang's 'Fire Water Burn' was responsible for greatly popularizing its chorus in 1997, despite being entirely lifted from Rock Master Scott & the Dynamic Three's 1984 'The Roof is on Fire'. By 2018, not only was the phrase considered "cringeworthy", but its replacement 'lit' was already considered "quite overused" and in need of its own replacement.
Per Merriam–Webster's 'Words We're Watching: It's Lit':
Rap has also given us a new meaning of lit. In the last ten or so years, lit has transitioned from being applied to the act of intoxicating ("gonna get lit") to the environment of those who are lit ("party's lit"). The wildness of such parties has led to lit gaining the meaning “exciting,” as well as a broader meaning along the lines of “excellent” (“Leslie Jones's commentary on the Olympics was lit"). We have evidence of the “exciting” and “excellent” meanings way back to 2004, and earlier use is likely...
'Fire' is an extremely common word (#697 in the British National Corpus) so—just like the early life of 'lit'—you can doubtless find earlier slang uses but its recent major surge has just been a grassroots transfer to speech of using the 🔥 emoji for 'lit', 'on fire', 'excited', 'exciting', &c. This parallels similar use of LOL, 💯, &c. The fire emoji was approved by Unicode in 2010, showed up on the iPhone &c. shortly after, and also shows up to indicate a 'hot streak' on Snapchat.
That was building on a slightly earlier swell. From at least 1700, 'fire' has been used to describe not just the fiery sensation caused by spicy food or alcohol but also the property within the items leading to that effect (OED's sense 17. a. & b.). From at least 2003, 'firewater' had turned into 'fireweed' (potent herb), which turned into 'that fire', which turned into 'that's fire'—initially as an approbation that it felt as good as quality weed but then quickly misunderstood as a variant of 'that's hot' (with all its associated senses of sexiness &c.) by just about the time the emoji showed up.
- Does the origin of this slang term trace to a particular cultural or geographical demographic more specific than or apart from the U.S.?
Again, it's an extremely common word and you could look for associations that aren't there. Most people are just using it based on the fire emoji's associations with 'lit', so the original demographic would be 'iPhone users'. On the other hand, 'lit' and 'fire' started their recent upsurge in the weed community and its celebration in mostly African-American musical forms like rap and hiphop.
- Why do we often see "fire" used in combination with "fam?"
Because English loves alliteration. Always has.
There's no other connection. 'Fam' is just a clipping of 'family' that gets used in reference to close friends (even an individual friend).