A History of Imagination
Horror and video games have been intertwined for almost the entirety of the latter's history. If you can believe it, the first horror video game (insofar as you identify “horror” by standard tropes of ghosts, ghouls, etc.) was on the Magnavox Odyssey, the first widely available commercial gaming system. The game in question, Haunted House (1972), relied on an “overlay” – translucent sheets that were placed overtop of your television screen to serve as environments, backgrounds, game boards and more – that put players in, as you might have guessed...a Haunted House. One player, the “detective,” would navigate through the house, trying to obtain items, while the second player, the “ghost,” would use a button on his controller to become invisible, then try to startle the detective while hiding the items.
I did not own a Magnavox Odyssey, and thus did not play Haunted House. I mention it because I think it illustrates an important point about horror in video games, and by extension horror in general. Limitations of technology in the early days of video games meant we needed to use our imagination. And the greatest fear of all lies in our imagination.
None of this is to say that Haunted House was actually scary, or for that matter that other, early “horror” games like, say, Atari's 1982 Haunted House (which was also an item collection game with monsters to avoid... go figure) were actually scary. No, in my opinion, it wasn't until the advent of storylines in video games that horror became actually scary.
Enter Infocom.