There have been a gamut of articles written on music in video games. They have ranged from the pros and cons of MIDI/MP3/MOD/etc. to the genres of music you should use. Being a professional musician (I work for several high schools as a marching band arranger), I pay extra attention to the music in games. I've formed some very specific rules about what and what not to do. Some of it is common sense, while some of it is less well-known.

DO use MIDI, compressed MP3, and compressed MOD files. MIDI files are rarely over 30KB and will add very little to the size of your finished game. Uncompressed MP3 files, however, will increase the size of your application to ridiculous levels, especially when your game is a demo or is very small otherwise. MOD files, unlike MIDI files, are both small AND sound the same on every computer. However, MOD is horrible if you're going for a rock, orchestral, or other instrumental feel.

DO NOT use your favorite songs in every level. Nothing is more frustrating than hearing Blink 182 MIDI's in every single level of your platformer. Not only is using commercial music unprofessional, it rarely fits. I know that not everyone can compose their own MIDI's, but if you're going to use someone else's music, make sure it fits.

DO use looping songs if possible. MIDI files are notorious for not looping correctly, and MP3's rarely loop at all. MOD's are great for looping, however, as long as they're small in file size. There will always be some pause between the loops, but MOD's minimize this. This is all a moot point if you're using long MIDI's for very short levels - the player usually won't hear the whole song.

DO NOT use songs at a volume louder than the game's sound effects. To test this, play the game without music and then with music. The sound effects should be equally clear both time. Unless you own a MIDI program, such as Cakewalk, Noteworthy Composer, Finale, or Sibelius, you won't be able to change the volume of a MIDI. However, MP3's can be easily converted to a lower volume. (Having a volume slider in your game will also make this a moot point.)

DO use ambient music if you so desire. This is a very good idea - if you want to build tension, or if you just want to replace the soundtrack with natural sounds. MOD's are best for this due to their versatility and low file size. MIDI's are next because they have a variety of pad and sound effect voices, while MP3's are worst for this because you may as well just play WAV's at set intervals.

DO NOT use other people's songs without their consent. I personally keep a copyright embedded in every MIDI I compose. If I find someone using the MIDI and not crediting me, I will contact them with the copyright infringement information and tell them to edit their project to either credit me or remove the MIDI. I've done this several times (and have even won a lawsuit against a company that was selling one of my games on a CD on the basis of my MIDI alone).

And finally...

DO use creativity. If you know anything about how to write music, attempt your own MIDI's! Learn how to compose if you're interested in it. Make your own MOD's! If you have a band, record your own MP3's! Not only is it more professional and more respectable, but you'll also get valuable exposure as a musician.

There are many freeware and shareware programs to make your own MIDI's and MOD's. You can even convert your MIDI files into professional sounding MP3's using a program like Audio Compositor. Experiment. There are exceptions to every rule (you'll notice that I've even snuck them in in the article).

Sincerely hoping that I never hear "What's My Age Again" in a game again,
Bo Fu