There aren't many episodes that announce themselves as instant classics, but "Yesterday's Enterprise" was one of them. It was an instant classic when it aired, and in the years since it has become an enduring one. It's one of the franchise's very best time-travel stories. (Every Trek series has had at least one that vied for similar thematic territory, whether it was TOS's "City on the Edge of Forever," DS9's "Children of Time," Voyager's "Timeless," or Enterprise's "E2.")
A rift in space and time allows the Enterprise's predecessor, the 1701-C under Captain Rachel Garrett (Tricia O'Neil), to emerge in an alternate version of the future and come face-to-face with the 1701-D. In this much different timeline, Starfleet has been at war with the Klingons for 20 years. The Enterprise-C's passage through time allowed it to escape a deadly battle with the Romulans after the Enterprise-C had come to the aid of a besieged Klingon outpost.
When the writers' were making their decisions in creating this story, perhaps the most crucial was their use of Guinan, who has a perception that transcends the timeline. She knows, with every fiber of her being, that the timeline is not right and that the Enterprise-C must go back, even if that means certain death for its crew at the hands of the Romulans. Because even their deaths could change history, as a gesture seen by the Klingons that could ultimately pave the way to peace rather than war.
What this does for the story is turn it into a moral quagmire with massive implications, where the characters must make impossible decisions. What we're really talking about here is playing God. More than 40 billion people have died in the Klingon/Federation war, and returning the Enterprise-C's to the past could prevent all of it. Picard, as one man, holds the power to make the decision. In a compelling exchange, Picard flat-out asks Guinan who's to say whether one timeline is more "proper" than the other? Her reply: "I suppose I am." To frame this as a 20th-century question: What if you could go back in time and kill Hitler? History would be, in Picard's words, irrevocably changed, but that would also mean undoing everything else that has happened since. Who knows whether you're alive or dead in the other timeline, and what implications that has on everything else unrelated to the variables you intend to change? (Of course, dramatic license means that this alternate timeline parallels the real one more closely than it ever possibly could; I myself subscribe to the chaos-theory/butterfly-effect school of thought.)
The question is of particular poignancy to Yar, who is alive in this version of the timeline and learns from Guinan that she died a meaningless death in the other one. This, along with her newfound camaraderie with Enterprise-C's Lt. Castillo (Christopher McDonald), prompts her to go back with the Enterprise-C and die a death that serves a purpose. It's impressive how much ground this episode seems to cover in a single hour. In addition to the moral and cosmic questions, it provides an interesting Trek history lesson that fills in gaps about one of the Enterprise's mysterious predecessors, and it manages to somewhat mitigate the effect of the ignominious death that befell Yar in the first season.
As an exercise in tone, the episode is remarkable, featuring a stark contrast to the other timeline. The lighting, uniforms, and performances all indicate a darker military existence. Picard, in particular, is notably more grim and intense; Patrick Stewart conveys a different and powerful urgency but never goes overboard. The last act, in which the Enterprise-D must protect the Enterprise-C from Klingon attack as it returns through the rift, is one of TNG's most intense and memorable battle scenes. As the Enterprise takes a pounding, it becomes clear that they cannot survive. Only by sacrificing the Enterprise-D does the Enterprise-C have a chance to rewrite history. Picard's announcement to the crew says it all: "Let's make sure that history never forgets the name ... Enterprise."