The best way of using music in a production is to write it yourself (or to pay someone to write it for you). However, there are times that you might not be able to, or want to do this. Using other peoples music is a tricky area to negotiate, and is something you need to think about before performance, otherwise it could end up costing you a lot of money.
Note: I am not a lawyer nor have any legal training. I am offering my experience and opinion as a musician and theatre person. If in doubt check a friendly expert.
Using Sound Effects
I have written about this before (see this post) but legally most sound effects (whether downloaded, on CD, Tape or Record) will have some sort of license. This tells you under what circumstances you are allowed to use the sound, and what conditions need to be met in order to do so. Some (especially free sounds) will require acknowledgement, or will forbid alteration. If you are creating a complex tapestry of sounds these conditions can get overwhelming. More expensive sounds are happier for you to have your way with them and give them no credit, but you still need to make sure you know exactly what is going into your mix, and where it came from. While you can just hope that nobody notices (and they probably never will) you can still be a responsible citizen and make sure that everyone receives the reward they ask for for their hard work.
Using a Recording of a Song
Sometimes you (or your director) will want to use a specific recording of a specific song for a scene or transition of the play. This is possible (and usually pretty easy) but you usually have to get permission from the rights holder (either from the writer and performer, or more usually though a collection agency). They will easily be able to issue you with a public performance licence for a fee. Check your local rights administration agency for more information. If you want a full complement of songs, though, this can add up.
Performing an existing work live
If you want to perform a song or composition with live musicians or on-stage singers you do not need a mechanical license, but you do need a performance licence for the original song from the writers or their agent. This can be slightly harder to find or organise, but is possible. It is a similar process to what you would go though if you were recording a cover song: you need permission for the song itself, but not from the artist who originally recorded the song (unless they also wrote it).
Recording a new version of the song
This is where things start to get complicated. By law to arrange (or substantially change) a song you need explicit permission from the original writers, and a license to record and reproduce that song for public performance. I can’t offer much advice here, as every example will be different, but work out what you wan to do and seek permission and advice early on.
Remember, when you adapt or arrange an existing work without permission that not only can you get sued, you lose a lot of artistic reputation. See this video:
There are as many different ways to present or reinterpret an existing song or recording as there are to skin a cat, but always keep track of what you are doing and the conditions attached to all of your sources. Respect those and you can feel comfortable in whatever you are putting into the theatre, safe in the knowledge that you are respecting and supporting musicians and artists wherever they are.
If you have corrections, suggestions, or useful links leave them in the comments!