When I was a kid, it was a really big deal that D&D showed up in E.T. I’m sure there were other instances that I’m forgetting or never even knew about, but off the top of my head the next time D&D had a positive mention in pop culture was Freaks and Geeks, 17 years later, and Buffy a couple years after that. In between, NewsRadio dropped D&D references all the time (though not quite as much as Star Wars references), but they were always in a disparaging context.
But these days, it seems like RPGs are referenced all over the place, and not always as the butt of a joke. On top of that, sometimes the references to them, or portrayals of them (almost always D&D) are actually somewhat accurate. Oh, sure, exaggerated for comedic or, less often, dramatic effect, but they are clearly coming from people who actually have some clue what they’re talking about, and might even have fond memories of roleplaying. And while he deliberately distorts things to boost his jokes, it’s very clear that Stephen Colbert knows of what he speaks.
Nonetheless, while other depictions have been closer on the details, I think the depiction of RPGs in the media that comes the closest to actually capturing the essence of roleplaying is the episode of Community where they play an RPG that they call “Advanced Dungeons & Dragons”. Oh, sure, just about all the rules are wrong, and there’s the over-the-top rivalry plot around Chevy Chase’s character. But the core essence—that it’s about people getting together to have fun telling a collaborative story, that there are rules, and that it is fundamentally a cooperative venture—was accurately shown. It was the first time since Freaks and Geeks where I felt that if that were the only thing someone knew about RPGs, that would be ok—they would understand the key elements, and understand why we play.