I was reading an introduction by Richard Matheson to his short story collection and he actually has a lot of psychological insight as to why he wrote those stories. He could lead the general theme to all stories back to : the individual trying to survive in a threatening world. It stems from his parents being immigrants and seeking refuge in a small family unit, being confronted by living in a strange new country which they knew little about.
I think you could apply that general theme to a lot of King too, although I would say it is paired with another major theme, which is friendship, friendship as a way to overcome those threats. Very clear in It of course, but you also see it in other books like Christine (Dennis and Arnie), Pet Sematary (Louis and Jud), Dark Tower (Roland, Alain, Cuthbert and Roland, Jake, Susannah, Eddie), Cycle of the Werewolf (Marty and his uncle Al, who is also a great friend), The Shining (Dick Hallorann, Danny's best friend under the circumstances).