The Meaning of Life, the Universe, and Everything.
The background ambient music in the overworld is cued by in game time with a random track (from the general gameplay group) playing at sunrise, noon, sunset, and midnight. A full Minecraft day being 20 minutes, a track is started every 5 minutes. I don't know if the trigger is actually tied to the time of day or just plays every 5 minutes (ie. If you set daylight cycle to false, I don't know if that affects the music).
I think the Nether tracks play continuously in the Nether but I may be wrong. There are also some specific tracks like for battleing the Ender Dragon. I believe creative mode has several additional gameplay tracks but I don't know about triggers.
Between the general gameplay music, menu music, and the music disc items, I believe there are about 40 different music tracks in game.
ah ok, thank you Puncher! That helps alot. If i change to /day the music don´t start. So i think witch cheats they can´t be triggered. Maybe i have to set the time -1sec before daytime(if day really means noon).