I think horns were traditionally used for these types of solos because they're loud and they really cut through the mix.
I think one big thing is the versatility of the electric guitar's sound. You can put it through different effects pedals to completely change the sound of the instrument. Wind instruments couldn't do this until the invention of the Varitone, but even then the natural tone of the instrument is still predominant. This is probably also why synthesizers became really popular.
I think another big factor is that the guitar (and other rock band instruments) is more "democratic". The guitar is more amenable to self-learning. It's cheaper than a wind instrument. Even beginner saxophones are several hundred USD, whereas you can get a low-end electric guitar for pretty cheap. It's easier to make a good sound right off the bat. Just press down a fret and pluck. No need to practice an embouchure and blowing technique. Really, the only hard part is to practice contorting your fingers into different chord positions. But rock musicians generally play a few simple chords, so this isn't that big a deal. And plus, you don't even have to learn to read music, since you can rely on tabs, which show you exactly how to position your fingers on the fretboard.
There was a discussion on /r/jazz on "Do average people (non-jazz fans) realize that jazz is improvisational?" And one answer is that average people don't realize how nuch improvisation is in music in general. The great rock guitarists often played improvised riffs and solos.
Guitars came in strong ( outside jazz/C&W ) with Sun Studios, but about the time Elvis joined the Army, it was Brill Building songs and piano. The Beatles then brought the guitar to prominence, but even then, almost as a stage prop more than an instrument - not to knock 'em as really good rhythm players but the solos were a bit rough. They caught flack for it, too.
One thing to consider - guitar players had to get better. Even for "stuff I'd played at 14" guys like Tommy Tedesco were ringers on everything recorded in LA until the bands got to where the members could play their own parts ( roughly at the time of Buffalo Springfield & The Byrds ). Same basic thing in England; Yardbirds/Zep and all that.
Horn players were already deeply established as serious players long before this, back to the 1930s.
Jazzer: "What do you play"
Classical: "Horn"
J: "What kind, sax, trumpet, bone?"
C: "There's only one instrument called "horn" you rube, and cor anglais doesn't qualify"
J: "Cor anglais??"
>But the truth is that electric guitar solos are directly descended from saxophone solos via Charlie Christian, who defined his instrument (which was once seen as a joke among jazz musicians, much as the saxophone’s a joke in rock) by being the first guitarist good enough to cop saxophone riffs in cutting contests
I've listened to a lot of Charlie Christian and Wes Montgomery over the years. The similarities to great horn players is quite up front, I believe.
One thing that could be of interest, if one were to actually write a book on the subject, would be tracing the cost & technology & 'market forces' between guitars and horns (sax) during the past 50 years - as in, if guitars got cheaper and better (amps, effects, etc), and saxophones kept a higher barrier of entry cost, that might be a factor in the transition. Also public perception. Like the hits Guitar Hero and Rock Band - I'm pretty sure there's no way to plug in an Akai EWI or Yamaha piece to jam out on, just because there's not really a market I suppose.