Even Buffy the Vampire Slayer isn't above using this trope at least once. In order to defeat the evil science teacher who is actually a giant praying mantis, Buffy uses the recorded sound of bat sonar to "make [her] nervous system go kerplooey". She learnt about that in science class earlier in the episode (though, thankfully, from the previous science teacher. No villain should be stupid enough to teach a class their own weaknesses). Although that's not how she ultimately kills the praying mantis. She does that with a big machete. It's Buffy, after all.
Doctor Who used to do this on several occasions, partly due to originally being conceived of as an edutainment program. For example, in the early story "Marco Polo" the condensation of water was a key plot point, while in "Planet of Giants", that pressurised cans explode when heated was another point. The Daleks were originally defeated due to elementary knowledge of electrical conductivity. The same technique was used to teach history in its early historical stories. Though most of the explanations happened in the course of events, not given out only to later be recalled.
The Musketeers: D'Artagnan is taught in episode eight to not let his heart rule his head in a fight, and this is useful at the end of that episode when he faces off against an opponent who tries to goad him into making mistakes.
Every episode of Black Hole High (a.k.a. Strange Days at Blake Holsey High) featured this. Apparently, the unpredictable wormhole at least had the good manners to follow the stateprovincial-mandated science syllabus exactly.
Given the way physics works at Blake Holsey (namely, that its laws will bend to teach you an Important Moral Lesson), it is entirely possible that the wormhole was doing it "on purpose", and the physics lectures or experiments in act 1 were really shaping the physics weirdness in act 2.
Or the time traveller could have done his history research and made sure the syllabus matched.
A lovely children's education show called Storylords entirely revolved around this. Somehow, Mrs Framish the reading teacher, always had either covered the necessary reading skill that day, or taught it the next day, in plenty of time for our hero to use it to defeat Thorzuul.
Subverted in Stargate Atlantis, when Sheppard finds himself in an F-302 latched onto a Wraith Hiveship in hyperspace. He flashes back to a memory of McKay and Zelenka arguing about whether a non-hyperspace capable ship could detach from another one while in hyperspace without being destroyed, which is exactly what Sheppard needs to know. Then they ask Sheppard what he thinks, but he's not paying attention because he's flirting with the woman at the next table. He ends up not taking the risk, and has to wait for the Hiveship to leave hyperspace.
Crossed with I Know You Know I Know in the 'Fingers and Fumbs' episode of QI, where host Stephen offers the contestants an opportunity to go double or nothing on a forfeit by playing Rock-Paper-Scissors with him. He mentions that, psychologically, people tend to pick scissors first, because it's commonly believed that others would play rock first, and so would play paper to counter it. Phil and Dara both tie with him on scissors the first three times it happens (Phil having played twice). The fourth time, however, Phil exchanges an obvious glance with Alan, and psyches Stephen into playing paper while he plays scissors. Dara and Alan also get to defeat Stephen, both using rock while Stephen kept using scissors.
Subverted with the infamous question about the number of Earth's moons. Back in Series A, they asked the question and the buzzer (obvious by wrong) answer was "one" with Stephen going to to explain there's a body that's in an orbital dynamic with the Earth that makes it technically a moon. Two series later, the question gets asked again and someone quickly answer "two" (remembering the earlier question). This turns out to be the buzzer answer this time around as additional bodies matching the criteria had been discovered since. They could have said "six" or they could have made a case for one (which, ironically, they tried the first time around), but the old answer of two was right out.
The third episode of BBC's 2010 Sherlock had Holmes fighting an assassin in a planetarium while an astronomy lecture played in the background. Wouldn't ya know, the lecture contained a clue that helped Holmes identify a painting as a fake and solve Moriarty's fourth challenge.
Justified, since Sherlock and John were there to find someone involved in the case. She was in fact trying to prove that the painting was fake and was at the planetarium specifically to find that information. She was fast-forwarding to the relevant part of the recorded lecture when the assassin attacked.
Exploited by the crew on Leverage. While setting up a con on a college student, Nate plays a professor who antagonizes the mark so that Hardison can make friends with him. The lecture Nate gives is about the prisoner's dilemma problem in game theory, and he tells the class that it's always better for the prisoners to turn on each other. Later, they put the mark in a situation where he has the option of turning on his confederates, and he flashes back to Nate's lecture and decides to do it.
In real game theory, it's better to cooperate, a fact that Hardison points out.
Only half true. The best result for both players is for neither to cooperate as they both get a low sentence but, in a situation where you don't know or don't trust the other prisoner to not cooperate, the better solution is to cooperate and hedge your bets. Hence the "dilemma".
Scrubs: One episode has the medical interns quizzing each other ("Diagnosis Jeopardy") and mention Wilson. When JD and Elliot have a lot of trouble diagnosing a patient, Cox tells them, "You must remember what you heard when you weren't even listening". This causes JD to remember and make the right diagnosis, but it's too late, and the patient dies anyway.
In the Breaking Bad episode "Crazy Handful of Nothing", Walter delivers a class on violent chemical reactions such as explosions, using fulminated mercury as an example. At the end, he goes to see Tuco and uses a bag of the stuff to threaten him into paying for the meth he stole (handily, fulminated mercury looks just like meth).
Raumpatrouille plays with this in the episode "Hüter des Gesetzes" ("Keepers of the Law"), which deals with worker robots malfunctioning as a result of a human-induced Three Laws conflict. Early on, the crew of the Orion are required to attend a course in robotics, which just so happens to address how to disable exactly such robots unarmed if they should ever go out of control and weapons aren't available — but because with the exception of Tamara Jagellovsk they're too busy goofing off in class, only she remembers the process when it's suddenly needed after all, and even she ends up not quite sure as to the final step that's supposed to restore the robot to its obedient default settings and has to guess. (Thankfully, after a few tension-filled moments it turns out she got it right.)
Person of Interest solves the problem by having the Machine access its memories of Harold Finch teaching it a lesson years before, in order to solve a problem it's handling in the current episode.