My first thought was Freaks and Geeks' final episode or the two episodes from Community. But really my favorite RPG represented in media was in E.T. And in a way the D&D game in that film was under-emphasized to what I think they had originally envisioned.
Robert Macnaughton who played Elliot's brother, Michael, was an avid Dungeons & Dragons aficionado (according to the April 1986 issue of Orange Coast Magazine). Supposedly, Spielberg had a game session run for the actors who were cast as the kids in E.T. just before they went into production!
At the dinner table, they are playing something that kind of resembles D&D...
Steve (GM): 5
Mike: Oh, great...
Steve: You got an arrow right in the chest and you’re out ten melee points.
Greg: Don’t worry about it Mike, I got Resurrection - I’ll bring you back.
Mike: I’m already one of the undead Greg, I can still throw death spells, huh Steve?
Greg: Just tryin’ to help you out man, don’t be so cranky.
Other kid: How about throwing a spell Order The Pizza Man? Order that pizza man, get it, huh?
Elliot: Well I’m ready to..now to..play - I’m ready to play now you guys.”
Someone: We’re in the middle Elliot. You can’t just join any universe in the middle.
Elliot: Mike? ...Mike?
Mike: You have to ask Steve, he’s Game Master. He has absolute power.
Steve: Gonna wait for the pizza first.
Elliot: Then I’m in?
Steve: Yeah, you’re in. Figure out your strategy because you’re playing after Greg....
Mom: So how do you win this game anyway huh?
Steve: There’s no winning, it’s like life, you don’t win at life.
Greg: Money helps.
Steve: Yeah, but...Throughout the film, the boys' banter references their game and gaming terms. (Zero charisma, Cintus Supremus), Though, no knows what Cintus Supremus means!
According to TV Tropes, there was an alternate ending planned where the boys are playing D&D again, but this time Elliot is the Dungeon Master.
There you have it. E.T. The Extra Terrestrial and its subtle D&D references.