Let's just go straight to the business.
NOTE TO CRITICS: REMEMBER, THAT THIS A LESSON FOR BEGINNERS!!!
So, what you should DO to make/be able to make a good solo?
In order to build a good guitar solo, you must do the following:
1. Learn how music works.
I am BY FAR NOT the first one to say this, but that's how it is. You need to learn how music works, if you want to be able to play whatever you want.
This includes learning the techniques you can perform on your instrument, music theory(musical terms, scales (and their modes), how chords are built, intervals, and so on. In the end of the lesson, I will introduce you to modes, and give you some scales to learn.
2. Find out what key is the song in.
It is very important to be in the right key to make a good guitar solo. (Not to mention that your phrasing and technique must be good as well).
To find out the key of the song, you need to look at what chords are present in the song. Write down what chords are being used in the song. Sometimes the song may shift between relative keys, or even raise/flatten the key in the middle of the song. That's why - write down the chords the song uses in general, and also in detail, by dividing which chords are used each part of the song.
After you've done that, look at the roots of the chords, and see which scales do these root notes fit.
It doesn't mean that you should stick only to that one key.
You can find a way around the key of song. A safe way is using scale modes (aka relative keys). Most scales have relative scales. But just, just as I said, we'll talk about that later in the lesson.
So... Whatever way do you go, to make sure, that your solo sounds good, you should use the right key, and both start and end on the right notes. Of course, some people say that there no "right" notes. But! It depends on the way you look at it. From the one side of the coin - you can use all notes any way you want. From the other side of the coin - in certain situations, some notes sound better than others.
Well, anyway... What I meant with the "right notes" thing was taking into account the notes of the chord that is being played at the moment of start/end, because it will lessen the chance of your solo sounding crappy.
For example, If you are playing a part of a song in E Phrygian, which both starts and ends on an E5 power chord, then the "right" notes to start and end the solo on are E and B.
This means, that it is safe to use B locrian, if you don't want to use E Phrygian to solo.
Or also, if you are playing in C major, and it starts on C major, and ends on an A minor chord, then the "right" notes to begin on are: C, E, G. And the right ones to end on are: A, C, E.
In order to find out the right notes BY YOURSELF, just look at the chords, and scrutinize at what fret each string is being pressed (open strings count too)
But don't just stick to chord notes, because by doing that you will only limit yourself, okay? I don; t want to be blamed for misledaing beginner guitarists. :D
3. Come up with some good phrases that you could use for the beginning of your solo.
A good solo needs a good start, right? Well, the first thing you should take into account is the mood of song in general, and mood of the song in that exact part. According to that you can choose suitable ways to start the solo.
Here are some examples:
You may start by shredding the hell out of the guitar right off the bat.
A good example of this to look at is a guitar solo of "One" by Metallica. That solo starts right after the thrashy interlude, Kirk uses a lot of legato (hammer/pull-off) runs there.
You may start by a few, not very fast, but very powerful notes with a good vibrato. A good example of that is an 80's metal classic "Still Of The Night" by Whitesnake.
That solo riff is not exactly a solo, though. It's more like a warm-up to a solo, but nonetheless, it sounds very melodic and powerful. It starts right after the violin part.
You may start the solo at a normal pace, not too fast, not too slow.
A good example is the intro solo of "Nothin' But A Good Time" by Poison.
You may "kick in" with the solo by using a slide at the first note.
A GREAT example of that is solo of "Open Fire" by Troy Stetina. (It's the first solo of his "Heavy Metal Lead Guitar Method" book).
You can start with a not very fast, yet a very tasty bend, and start slowly descending a scale for a while, and then stop for a few pentatonic phrases.
A good example is the guitar solo from "Home Sweet Home" by Motley Crue.
There's tons of options, just see sounds cool and fits your song.
4. Think about what how are you going to play the rest of the solo, how are you gonna end it, how are you gonna put everything together.
After you've come up with some good phrases, you need to put everything together. To do this effectively, you must have good phrasing and a decent knowledge of scales and their modes.
Let's say that you started with a slow, tasty bend. That's good. But where are you going to go afterwards?
Well, you could, for example, jump to the middle of the scale, play a few notes back and forth a semitone, then add a pre-bend, vibrato, and run down the scale a bit using 8-note triplets. A part of a guitar solo is done this way in the song "Every Rose Has It's Thorn" by Poison.
Or maybe, you could repeat the same bend a few more times, only faster, and then shred a bit, and then again go slower, and play around with intervals, ending with a beautiful pinch-harmonic with a vibrato.
Then, add a few good-sounding slides, throw in one more vibrato, and then descend to the lower notes with the blues scale(according to the key of the song, of course), ending the solo with a cool, wide vibrato.
Just like I said before - there's tons of options. You can experiment with notes, phrases and techniques any way you want. But to be sure that what you are creating is something of high quality, then you must put effort into studying music, into what you're doing.
Now, just as promised, let's talk about modes.
By the way, REMEMBER THIS:
Musically, mode = scale = key.(that means, all three of these terms mean basically the same, only with subtle differences).
What we, musicians call "modes" are relative keys.
Relative keys are scales that consist of the same notes in the same linear (figuratively speaking) order, but start and end each on it's own note.
Here is the most popular example of modes, the relative scales of C major:
EVERYTHING'S IN STANDARD TUNING!!!
Now, you may have a few questions, which sound something like this: "How does all of this stuff work? How and what for can I use it? What about other scales?"
Basically, it works like that: you take the scale of the song, and shift from the initial root note to another note, making it the new root note to stick to for however long you want/need. And that, is how you use it.
Some of the reasons what musicians use modes for are:
To contrast the moods of your solo (or the song in general)
To contrast the sounds
To make interesting musical "surprises" (This one can also be attributed to intervals as well).
Another question in your head might be: "How is it with other scales?"
Well, If you'd be in the key of D major, then the modes would be:
D major, E Dorian, F# phrygian, G Lydian, A Mixolydian, B Aeolian, and C locrian.
Why? Because each type of scale follows it's own pattern.
The pattern of the major scale is: 2-2-1-2-2-2-1. 2 = a whole tone, 1 = a semitone. To be able to "count out" the modes, you need to know the patterns of scales.
The introductory example of modes that I gave you, is the most popular example of the modes of heptatonic (7-different-note) scales.
There are boatloads of other types of scales, and their respective modes and patterns. You can look them up in the internet(obvious, I know it). Btw, there is a good lesson about pentatonic scales and their right here on UG. It's called "How To Begin Soloing And Writing Your Own Stuff". That lesson is a bit off-topic, but it contains a lot of useful information. Check it out ;)
One last thing. Just in case, if you are curious about scale patterns, but don't want to spend time looking for them in the internet - there's another way to, at least partially, discover some more. It's not hard. Just take the example of modes that I already gave you, and analyze each mode. Look at the fretboard and see how many frets are between each note. That way you will learn those patterns in a matter of minutes.
I hope that this lesson wasn't boring/misleading and was of good use to you.