The rhythm part is like a canvas you're painting on - and you want the paint to stand out, right? So it stands to reason that you don't paint the solo with the same color as the backdrop.
There are a couple effective ways to do this. One is to set your solo in a different range than the rhythm part. If the rhythm part is being played in the middle of the guitar's range, start your solo higher or lower.
You can also set your solo apart by soloing sparsely if the rhythm is busy, and vice versa. The interaction between the soloist and the rhythm section is going to make a huge difference, so keep listening to your band members!
I also feel that playing well is all about making strong statements. As you're deciding what to play next, think, "Do I mean it, or am I just playing what falls under my fingers?" In my mind, you gotta mean what you play!