Ooh, good one! Was it an eclipse in both the original B&W Roger Corman version and the musical version?
I was also going to mention Roxanne, a modern day retelling of Cyrano de Bergerac. I loved the movie. The comet is a minor part of the plot, but the title character is an astronomer who discovered a comet which is soon going to be visible to the naked eye. It does so at the very end of the movie, but in Hollywood fashion. It streaks across the sky in a minute or so. Nice ending but bad astronomy.
An episode of The Simpsons famously featured the Aurora Borealis at unlikely time of year at an unlikely time of day localized ENTIRELY within one house’s kitchen.
One episode of Sherlock (the Benedict Cumberbatch one) has a plot point relating to the depiction of a specific supernova in a Vermeer painting.
Zulu Dawn failed to dramatize the solar eclipse that occurred during the battle.
I’ve only ever seen two shows that got constellations correct. One was Lucifer, in a scene from the penthouse balcony. There wasn’t any particular significance to the shot, beyond it being night, but assuming that that scene took place in summer (it being Los Angeles, it’s hard to tell) and facing south, the constellations in the background were right.
The other was Avatar: the Last Airbender (the original, animated one). There, it was a map of the sky. I don’t remember what significance it had, but they could have just as easily used a random starfield, it being a fantasy world. The show did also have other astronomical events that were significant to the plot (in particular, a comet that increases the power of the firebenders), but the star map wasn’t related to that.
For other events:
In The Hobbit (certainly the book, and probably in the movie), there’s a hidden keyhole that can only be found by the last ray of light of the setting sun on a certain day. In the book, it says that astronomical knowledge has diminished to the point that nobody can be sure any more how often that certain day would occur, but it doesn’t take very much astronomical knowledge at all to know that it’d be nearly every year.
Does Moonstruck count?
“Guardatte la bella Luna!”
The Lion King has multiple scenes of characters watching and discussing the stars, culminating in Mufasa appearing to Simba in the night sky.
Moana shows the title character learning to navigate via the constellations.
In Peter Pan, Peter leads the children to Neverland by flying toward the second star to the right (and straight on till morning).
Aurora borealis in Local Hero (1983).
I’m confident that Bruce Almighty does not count as sci-fi, despite its main character gaining omnipotent powers. Anyway… Bruce decides to click his fingers (or something like that) and move the moon a bit closer to the earth, to make things a bit more romantic while he’s with his other half. Cue unintended consequences as tidal waves wreak havoc etc.
A Connecticut Yankee in King Arthur’s Court features a similar escape from death via a convenient eclipse. I know it features in the Bing Crosby version, although I’m not sure about other adaptations.
The “rescued by the eclipse” idea (which was inspired by what really happened to Christopher Columbus on his last voyage – so don’t complain about how unlikely it is that someone could use prior knowledge of an eclipse to his advantage, and could be around just when he needed it) showed up in the original novels of King Solomon’s Mines and A Connecticut Yankee within a few years of each other, with King Solomon’s Mines appearing four years before Yankee.
At the end of the Rite of Spring sequence in Disney’s Fantasia (1940) there’s a solar eclipse done for effect, and to suggest the passing of the age of the dinosaurs.
In Joe Versus the Volcano, Joe has an emotional event while watching a moonrise.
In Jane Austen’s Mafia!, two children are watching the night sky. The boy sees a meteor and makes a wish. The girl suddenly develops breasts.
Melancholia
A visually stunning film where Earth faces annihilation by a rogue planet. Less sci-fi, more existential dread and psychological drama. Not exactly a happy-go-lucky, first-date kinda movie, but a beautifully crafted exploration of depression, denial, and the end of everything.
At the end of Clash of the Titans, Zeus creates several constellations to commemorate various characters.
This is reasonable – the myth appears to have been created to correlate those constellations – Perseus (holding Medusa’s head), Pegasus, Andromeda, Cassiopeia, Cepheus, and Cetus the Sea Monster.
I’ve made the argument in my book Medusa: Solving the Mystery of the Gorgon that the reaon so many of these are associated is because the Gorgon’s head in Perseus, the constellations Cepheus, Cassiopeia, and Cetus all contain significant, bright, and highly varying variable stars. In fact, all the variable stars are in enemies of Perseus (The king and queen turn against Perseus before he marries Andromeda).
The movies Pitch Black and both film versions of Isaac Asimov’s Nightfall (as well as numerous audio adaptations) feature multiple eclipses that result in rare cases of total darkness on a planet’s surface.
Of course, these are all science fiction examples, so they fail the OP’s criterion.