"The Midnight Sun" is the tenth episode of the third season of The Twilight Zone, and was first broadcast in November of 1961. It starred Lois Nettleton and Betty Garde as a pair of women trapped in a New York tenement building, and featured a small roll for Jason Wingreen, who would later become the voice of Boba Fett.
For reasons unknown, the earth has left its orbit and is spiraling slowly into the sun, leaving the people of the earth to flee northwards to extend their lives a little bit longer. Two women in a New York City apartment building, the young Norma (Nettleton) and the superintendent Mrs. Bronson (Garde) instead stay where they are, figuring that there is no reason to prolong the inevitable. As the water and electricity goes out, and as the streets below descend into chaos, the two wait for the end. While the importance of "twist" endings in The Twilight Zone is often overestimated, this is one of the episodes with a clear "twist" ending.
It could be that this episode's deadly heat is a metaphor for something else: perhaps the aftermath of a nuclear war. It could also be that the episode, featuring the young Lois Nettleton in a variety of thin nightdresses while sweating profusely, was meant to be titillating, by the standards of 1961. But I take it that in this episode, temperature was just used as a stand-in for any condition, such as hunger that reminds us of our biological selves. This is a story (much like The Shelter) about the layers of civilization being stripped away. It is, however, a bit lighter than some of the proceeding episodes, and could be viewed without too much need for introspection on the viewer's part.