Rick Beato is one of my favorite YouTube guys, but his topics can get way over the average guy's head in a hurry in terms of music theory. I know a fair amount of music theory and I've seen a number of his talks just go sailing right over my head, but oh well, to the topic.
I've been playing at being a "lead guitarist" since about 1968, which is roughly when I discovered the blues.
I think that if you want to write good solos, well, you need to be able to play good solos, or at least understand them pretty well. So I'm gonna take you back to my roots with some recommendations. Back before I discovered the blues, I was really into Hendrix and Clapton of the Cream. Those two were my guitar gods and I listened to their music constantly. I got to where I was able to play a number of their licks as well, picking them off of records by ear. Then when I started developing a blues style, I became somewhat more analytical. I spent a HUGE amount of time with the first three John Mayall and the Blues Breakers albums: with Eric Clapton, Peter Green, and Mick Taylor -- in that order. Of the three, I found the first, the one with Clapton, to be the most formative. To me, it sounded as if the licks Clapton was playing were improvisational, whereas by the time Mick Taylor arrived on the scene, it sounded as if they were coming from a canned repertory.
But little did I know . . . it was a few years later when I heard my first Albert King album. Suddenly I'm hearing all these licks that I had heard Clapton play -- difference was King was playing with a more or less clean sound using his thumb, where Clapton was overdriving his Marshalls and playing with a skritchy-sounding pick. Huh, that was a real eye-opener. So, yeah, definitely add Albert King to the list. I also listened to a lot of American blues artists, mostly folks that played electric guitar, like the great BB King and John Lee Hooker. Also the Paul Butterfield Blues Band, although I found them to be a bit too slickly commercial for my tastes.
As time has moved on there have been so many talented players who have made their marks, and I'm sure I don't know the half of them. Folks like Joe Walsh of the Eagles, Eddie Van Halen, Steve Vai (and the whole shred movement), Joe Satriani, George Benson, Lee Ritenour, Larry Carlton, Russ Freeman, Norman Brown and many more. All of these guys are worth spending some time with, analyzing what it is that makes their solos work.
And that's just guitar. When it comes to keyboards, I'm not at all current as to who's hot. I remember listening to a lot of Brian Auger back in the early 70s, who played a Hammond B3, Keith Emmerson, Rick Wakeman of Yes, and Jan Hammer of Miami Vice fame. Of them all, I guess I liked the kind of laid back style of Auger the best, although I was quite impressed with Hammer's ability to emulate guitar. I also enjoy good saxophone solo work. There have been quite a few sax greats, but probably the greatest contemporary sax player -- or at least the most influential -- other than the likes of Dave Koz who does a great job of self-promotion -- is David Sanborn. Man, can that dude play the horn!
Now, if I may discuss for a bit some basics of not just writing solos, but melody in general. General things to keep in mind when you're writing. If writing in a common time signature, like 4-4, try to have your most important notes land on the downbeat. When playing in 16th notes, for example, that means notes 1 and 3 of a quadruplet, with 1 being favored over 3. These "most important" notes are often the highest notes in a scale passage or arpeggio. Don't be afraid to mix things up rhythmically. Some folks can pull off solos of all 16th or 32nd notes, but I don't recommend this. Changes in rhythm add to the element of surprise, which keeps a listener engaged. Also, when planning out the overall structure of the solo, it should have a beginning, middle and end. Just like a good book or short story, it's important for the beginning to have a good "hook," to set the listener's interest. This is built upon, where the middle often employs more exposition, slowly building thematically, possibly by restating or embellishing upon a theme. And the ending needs to have a climax -- some sort of virtuositic flourish that anchors the whole thing. And once this is played, the solo should come to a conclusion shortly after.
Now, if you're playing over a fairly common sort of progression, say a I IV V or a I VI IV V, you can stay pretty much in one key the entire time. Frequently in blues, players will switch back and forth between major and minor, depending on where they are in the progression -- actually usually it's mixolydian and dorian, but major and minor is close enough. But other progressions are not so easy to solo over, and this is where you have to examine the progression more closely, analyzing the chord structures and seeing if you can puzzle out an interesting sounding thread of notes that weave in and around these structures. That can be challenging, but it is usually well worth the time spent, so I strongly recommend you take this approach when writing solos over more complex progressions.
Okay, well I've blathered on long enough. Should give you a thing or two to think about, at any rate.