Richard Wagner pioneered use of the leitmotif in his operas. Our most recognizable leitmotifs tend to be associated with evil or villains, such as the theme from Jaws and Darth Vader's theme from The Empire Strikes Back.
Another kind of ominous music is the fugue, esp. those of J.S. Bach. This is the kind of music that vampires play on huge pipe organs in the dead of night.