Stories about the need to protect one's home have likely existed as long as human beings have had homes, but for most of the time we've been writing our fiction down siege stories focused on homes that had other primary functions: Castles, forts, military bases, etc. Occasionally mere homes might be uniquely imperiled: the wife and children left alone to guard pioneer cabins in disputed Indian Territory were a favorite suspense-builder of dime-store Western novels. But it wasn't until the post-WWII era that American popular culture fell in morbid love with the "home invasion" genre.
This was, of course, because the postwar "boom" of the late-40s and 50s was the birth of suburban home ownership as the keystone of the new "American Dream" (the previous American Dream being "to live there") that oh-so-coincidentally fit into the country's broader economic needs:
Marry your High School Sweetie as soon as you're able! ...because couples spend more and have more expenses.
Get a job that'll last lifetime and put down some roots! ...because enough people staying in one place will necessitate the development of highly-profitable commercial and retail districts to service their recurring needs!
Have a BUNCH of kids! ...because we need a lot of manual-laborers. Oh! And more soldiers. Yeah, turns out the Soviets might be more of a problem than we thought. Oops.
Don't rent - BUY a house! ...because being in hoc to the bank works out better for Uncle Sam than just owing your landlord once a month.
But don't do any of that in the city - cities are scary. Move to the suburbs! ...because turning all that reclaimed wilderness and unused farmland into cute lil' neighborhoods is a really good job-creator!
Not that I'm a cynic or anything.
In any case, postwar America was all about the security of The Home: The world is scary, your house is your castle, stay there as much as possible, buy more stuff to occupy your time there. The incursion into The Home by evil (or even simply by inconvenience) became the great modern anxiety of the age and has remained ever since. Suspenseful movies capitalizing on that very anxiety have been a fixture of cinema for just about as long.
One of the best examples in recent memory is YOU'RE NEXT, a new horror film opening this weekend where the only thing more shocking than the gore and the anything-goes body count is how sharp and well-written the screenplay is. The setup? A dysfunctional upper-class family reunites at their isolated vacation home to patch things up; only to be set-upon by a team of well-armed, unusually well-trained killers in animal masks. To reveal anything else would be unfair, but suffice it to say it's one you shouldn't miss.