One major theme in "There will Come Soft Rains" and many other Bradbury short stories is that technology will harm mankind.
This would relate to the ideas and moods of late 1940s America because many people had fears of nuclear warfare. America dropped the first atomic bombs on Hiroshima and Nagazaki in World War II. Even into the 1950s school children around the US practiced duck and cover drills in the event of a nuclear attack.
In "There will Come Soft Rains," the entire polulation is gone after a nuclear attack. The only thing that remains is a house with artificial intelligence and it tries to keep running even though the people are dead. Eventually, the house catches fire and "dies" too.
I would suggest that much of the pessimism that Bradbury features in the short story comes in the form of technology. Throughout the period leading up to World War II and during the war, itself, there was a belief that the acquisition of technology would make life better, more bearable. Advances in warfighting technology would yield greater benefit for those fighting and in ending the war. The believe at the time was that humans should appropriate and take control of technology. Bradbury's short story reflects pessimism in detailing a world in which humans don't "get" technology. Rather, technology "gets" human beings. The world that Bradbury details is a technological one. This is right down to the presumably nuclear holocaust that has wiped out all life, maintained with nuclear fallout radiation. The fact that the house does all that it does is a painful reminder of how great technology can be and how empty it can be at the same time. It is in this vein where Bradbury posits much in way of failure and despair, contributing to the feeling of pessimism throughout the story. A society that can make such a technologically driven house is the very same society that can render it useless by wiping out all forms of life in a nuclear disaster. In this, there is abject pessimism and fear regarding the future, a future that technology cannot avert as the house repeats its same function day in and day out, without any notion of the world around it.