Get a circle of fifths chart by doing a Google search if you don't have one already.
Look up the tabs to the song, or even if it's a song you're writing on your own, and gather up all the notes that are being used. Then write them down on a piece of paper. This is called doing a pitch inventory.
Sort out the notes, and take special notice of the sharps or flats that are used in the song. Match up the given number of sharps or flats to the circle of fifths. Notice that in the key of C, there are no sharps or flats, while in the key of G, there is one sharp, the F sharp.
Verify your findings by checking to see if the key that you decide the song is in matches the first note played, which is often the song's key. Be careful, however, as this is not always the case, and the steps given above are a much more efficient way of finding the song's key.