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.
I think horns were traditionally used for these types of solos because they're loud and they really cut through the mix.