Once you become fairly knowledgeable about several scales (where they work, the "feel" each gives give and of course where they're located on the neck) I think the best way to determine your lead-solo is to, in effect, vocalize them. Using your voice to kind of sing the notes you want to hear over the rhythm, and then play them on your guitar. It isn't as difficult as it might seem. You can mix scales, for example Hendrix often mixed the minor-pent (blues scale) with the major-pent, pivoting from one into another from common notes they shared. As you become more and more familiar with them, it'll become a sort of instantaneous thing. As you sing them (or hear them in your head) your fingers will move toward them. (You can hear Hendrix singing notes as he played them on several of his recordings, which makes me think he relied on this technique.)
The best solos (I/m/o) are those that are improvised. When you hear a great solo on a recording it was probably being improvised on the spot as he played, not from pre-written sheet-music or tab. But that recorded version became the definitive "etched in stone" solo. Probably no two takes he played were exactly alike at the recording-studio, but the producer (or artist) just chose the take he liked best for the recording.
So try to vocalize your solo over the rhythm. Your mind (and voice) knows what will sound good. And then locate them on your neck and remember when you play them it doesn't have to be exactly note-for-note as long as you're keeping the feeling and essence of what you've envisioned for your solo.