The primary map of association has major keys being associated with a warmer happy feeling and minor keys leaning towards a more cool and sad feeling. At the same time, having more sharps in a scale creates a brighter sound while having more flats creates a darker and more mysterious sound.
Of course, these terms are poetic generalizations and might be interpreted slightly differently by different people. This creates 4 primary general categories of warm/bright, warm/dark, cool/bright, and cool/dark.
Soundtracks also make heavy use of musical modes, whose altered notes offer further emotional range. For example, the Dorian mode replicates and conveys a minor keys associations except for a raised (sharped) sixth note which adds a hopeful and bright touch to the cooler minor sound, and is therefore often used for melocholy but hopeful or mystical music.
On the other hand, Phrygian has a note lowered (flatted) from the minor scale instead of sharped so it can sound even darker and more intense than the normal minor scale.