Learning music theory would definitely be a great help. Sounds to me like one thing that would be really good to learn is the interaction of scales and chords.
Aka, how to compose a chord, what chords are contained in a given scale, how scales are formed.
So the first thing you should learn is:
1) scales - major and minor first. These are the basis of most blues songs and any genres that come from blues. You want to know how to construct them, and how to play them on guitar.
2) Of course, you also need to know the spaces between different notes, called intervals. Learn how to identify intervals. Once you do, that puts you in a perfect place for learning how to build a chord.
3) Individual notes in a scale can be combined to give you a chord. So check out how to form chords - minor, major, and 7th chords are a good start. If you're into jazz, then you'll want to go more in-depth, and learn 9 chords, flat five chords, fully diminished chords, etc. (these are what give jazz songs such a distinct sound).
4) And then you want to look into how to form chords on guitar - for example, if someone tells you to make an Edom7 chord, how to do that shape. If you learn the above three things really well, this step is pretty easy, since it's just an extension of step 3.
Then from there it's pretty simple. Once you know those things, you can just listen to a song, play a few notes to figure out what scale fits, and then, voila - you then know the key of the song, and what chords are used in that scale, and what sounds good over it.
First:
How to read scale charts (click me!) (though I assume you already know this one)
Constructing major scales Intervals! A fun tool to test how well you can pick out intervals by ear Basic chord building And once you get that, you can definitely look into more advanced stuff.
http://www.zentao.com/guitar/theory/PS, it's awesome that you're wanting to learn music theory. Last year, I was against it because I thought it put too many rules on me. But then I realized - music theory isn't really a set of rules. It's a set of tools, that give you a million different options for playing. If it wasn't for music theory, I would still probably still trapped in playing minor pentatonic scales over every song. But music theory showed me a ton of options that I hadn't even considered before - lots of ways to ad flavor and different sounds to your solos and chord progressions.
Fun blurb on the awesomeness of music theory Fun fact: Joe Satriani and Steve Vai are huge fans of modal music theory. In fact, Joe Satriani's favorite scale is the Spanish Gypsy scale.
Final note: If you haven't already, I HIGHLY recommend that you learn where each note is on your guitar. In other words, if I ask you where the G# is on your guitar, you should be able to immediately point out where each G# is on your guitar.