So some solos just are guitarists playing a bunch of notes that sound good, but other solos kinda sound like the guitar is singing

For example : the Smells Like Teen Spirit solo

If you play it you'll hear the guitar basically singing "load up on guns, bring your friends..."

Are there any little tricks to these kinds of solos?
^ pretty much, i recommend if writing your own solos to leave that for last. imitating the vocal melody a little here and there can really add to a solo (but if you do that for every solo it becomes predictable and bland)
Yeah it's a pretty cool technique, but if you're going to use it in a solo, save it for the finale, or after you solo, do it along with the singing. It's a nice way to finish it all off.
Quote by Swap-Meet
So you basically just try and hit the notes that the vocals are hitting?

Yeah it's not hard if you know your theory.