How can I tell what scales go with which chord over chord progression

Best Guitarist Hands Down: Adrian Smith
^For most beginner musicians, their ears sucks and most intermediate musicians already know how to solo.

To T/S
The two best ways to improvise and solo are finding the scale in which all the notes of the chord progression fit into and using the chord tones of the chord being used. It's usually best to use both methods in a good solo.

If a progression has the chords Gmaj - Cmaj - Dmaj and the notes of each chord are GBD, CEG and DF#G respectively, all we need to do is find a scale that has all of those notes. Using circle of fifths (click the link if that's a new concept), we know that the only scale that contains an F# but not a C# is the G major scale.
[U]        | |                     [/U]
[U]        |/     .-.              [/U]
[U]       /|_     `-’       |      [/U]
[U]      //| \      |       |      [/U]
[U]     | \|_ |     |     .-|      [/U]
      *-|-*    (_)     `-’