Finding the key that’s right for your tune depends to some degree on its harmony and how active the melody is.
Posted by Sean McGowan
Excerpted from Fingerstyle Jazz Guitar Essentials: Building Arrangements
For example, a song that has a number of long tones (half notes and longer) may need to be in a key that can take advantage of some of the guitar’s open strings—keys like C, G, D, A, and E. The short melody in Example 1a appears in the key of Bb and is transposed down to A in Example 1b.
Notice how both keys offer different advantages for this particular figure. The key of Bb allows for an open string in the bass, while the key of A has a few spots in the melody that can be played on the open B and E strings, creating more sustain in the melody and more room for your fingers to do other things if need be. It all depends on what particular sound you are going for!