Mmh...
There is several games that have very good musics...
Torment has an excellent soundtrack. Fitting and moving.
Final Fantasy 7 musics were inspiring and invigorating, and matched the game, despite being only midi files.
Rome : Total War and Medieval : Total War, as well as Total Annihilation, have awesome music, that just seems to be part of the action. I guess there is some musical quality to the total destruction in the title.
Civilization 3 deserve an honorable place for the Conquest expansion music, and the modern age ones on the whole.
On a somehow special class, Battle for Middle-Earth has a stunning music. But it's a kind of cheat, as it's the music of the movies.
But, against all odds and against all reason, my very favourite soundtrack is...
A tie between Chronotrigger and Turrican 2
I know it must be nostalgia in action, but really, the musics (in midi format...) of these games, are REALLY good. I got them on the Net and worked with them running non-stop on the computer for a full month. They're catching, fitting and good.
Gah.