Hey Nick.
I think I've been over some of this before, so sorry if I'm repeating myself.
The major scale is the basis for a lot of what goes on in Western music and the related theory. I'm sure you'll have noticed that a lot of theory is explained using the major scale as a reference.
For example, the scale degrees for a major scale could be numbered:
1 2 3 4 5 6 7
To reflect how the Lydian mode compares to the major scale, you could number the notes as:
1 2 3 #4 5 6 7
So the Lydian mode can be thought of as a major scale with a raised fourth degree.
I mention the above because not only is the major scale the basis for a lot of melodic content, but it's ALSO the basis for harmonic content (chords and progressions). In other words, if you take something like the C major scale:
C D E F G A B
You can make triads (3 note chords) out of it, starting from each note and moving up a major third and a perfect fifth. This is called harmonizing the scale (check out this site:
http://www.zentao.com/guitar/theory/chord-scale.html)
C E G - C Major
D F A - D Minor
E G B - E Minor
F A C - F Major
G B D - G Major
A C E - A Minor
B D F - B Dim
You can then number the above chords as follows:
C Major - I
D Minor - ii
E Minor - iii
F Major - IV
G Major - V
A Minor - vi
B Dim - vii
The Roman numerals are just a convention, but they help us remember which of the chords are always major, minor or diminished etc. They also come in very handy for describing chord progressions without having to bother about the key a song is in, but more on that later.
So, in the above example, not only is the C Major scale giving us the notes for the scale, but it also gives us a framework for building a bunch of chords from those notes. In short,
playing in the key of C Major means that you're going to be playing melody lines and chords made out of the notes in the C Major scale. Like all rules, there are lots of exceptions, so read on.
This is useful for musicians in a group, because if I say we're going to jam a blues in C Major, you can assume we'll be seeing lots of I, IV and V chords from the harmonized scale (C, F, and G chords) in pretty predictable patterns. You'll also have a clue as to which notes you can use to play melodies over the top of the chords, because the notes in the scale are the same notes used in the chords, so they will fit together with the chords and "resolve" nicely.
Of course, it's not as cut-and-dried as that, is it? ? Blues solos over a major blues in the key of C Major can happily use notes from the C Major pentatonic scale (C - D - E - G - A) and you'll notice that all of those notes appear in the C Major scale itself. However, blues solos very commonly use the C Minor pentatonic scale (C - Eb - F - G - Bb) over the major chords we described above (C, F, and G).
In theory, it's "wrong" to use the Minor pentatonic over a Major chord progression (there are no Eb or Bb notes in the C Major scale) but blues and rock music abounds with cliches doing exactly that! In fact, most of us start our soloing efforts with the Minor pentatonic scale, and it fits nicely over both Major and Minor chord progressions. The reason we can get away with it is that the "off" notes (or "outside" notes) of Eb and Bb in this case, create a sense of tension in our melodic solo lines because they don't "fit" (resolve) to the scale that the chords are built on. Then, when we finally do hit those notes that DO come from the scale, there's a definite sense of "relief" or resolution which is a very satisfying way to end a musical statement, almost like a full-stop at the end of a sentence.
The above use of the pentatonic scale is just one manner in which the "rules" of playing in a key can be bent and broken. If we were only allowed to use notes from the scale in a very strict fashion, music would sound very boring and predictable. I've also only touched on the basics: we can do much more than build triads from the Major scale: we can build 4 note (7th) chords in a similar way, we can use the various modes of the Major scale to create chords which they can fit over (modal chord progressions), and a whole pile of other stuff.
You don't have to know all this stuff to get good use out of understanding the basics of the above though. Through experience alone, knowing that the song you're playing is in the key of A Minor (for example) will tell you right up front that you can potentially use scales like the A Minor pentatonic, A Natural Minor, A Melodic minor etc. for playing a solo and that you'll be seeing lots of chords from the harmonized A Minor scale. That's really handy if you're just jamming along without too much prior knowledge of a particular song or chord progression.
There are lots of songs that stick quite strictly to what's available in the key, and then probably just as many that sneak in chords from other keys (and there are rules for that too) or that modulate to a new key for certain parts of the song, or whatever else the composer can think of to get away from the restrictions around what is available in a certain key.
Finally, the concept above ties directly into what you're talking about in terms of key signatures. Because we don't write "A", "Bb", "G" (these symbols are not universal musical symbols) or whatever at the start of a piece of music to show what key it's in (and therefore which scale notes we'll be using), we can instead indicate which notes are sharps or flats and that actually tells us which key we're in. For example:
C D E F G A B (no flats or sharps in C Major)
C D E F G A Bb (1 flat, and in music theory this means the piece is in F Major or its relative minor, D Minor)
So if you see 1 b symbol in the key signature you know which scale and which notes were used as the basis for the piece, which gives you some advance knowledge. And, the more you play in certain keys, the more accustomed you become to which positions and chords are associated with those keys.
Regardless of whether you're reading notation or just jamming with other musos, having an understanding of what playing in a certain key entails is very useful. You can actually get a lot of utility out of an even elementary grasp of the theory. However, if you are aiming for being, say, a jazz musician, then you will want to invest lots of time and practice in understanding what can be playing or superimposed over different progressions in different keys, so that you're as flexible as possible, while still maintaining the creative elements of your playing.
It's like painting: you can create a great picture with just red, silver and green, and if you're creative you can "imply" lots of other tones in the way that you use them. However, having even more colours at your disposal opens up lots of possibilities for ever more complex and unusual combinations.
I hope that makes sense, I tend to ramble. ?