You know, I am reading a theory book right now by Jim D'Ville and Bill Keith called "The Natural Way". I think it is really terrific and I would recommend it to you as a great place to start.
My approach is to listen to the melody of a tune, decide which position on the neck to play it and then find the optimum scales to use. For example, in the key of "D" it may be the open position, the second position with all notes closed, the fourth position etc.
Once I decide on a position, I will review the scale and also the arpeggio of the scale to reference when I improvise.
Here's a tip. Rather than always starting on the 1st note of the scale when improvising, for example the "C" note of a C scale, try starting on the 3rd (the "E" note) or the fifth (the "G" note). Just trying this may help you break out of established patterns. I hope this is useful - it is a huge topic and there are many music books dealing with scales, but none of these are as useful as just learning to play the melody correctly and where on the neck to play it.