Working backwards from that, if you want a riff or lead to have a certain flavor, watch your 3rds! If you're soloing over minors, the worst thing you can do is hit a sustaining major third (okay, not the worst thing--but I promise you that's the only note anyone will remember because it will be screaming at them).
However, like in Uriah's examples, a nice minor 3rd--major3rd trill will fit about anything--
Oh man, he's right: theory hardly matters. I mean, it's nice to understand it, but just play, listen, and recall the next time what hit your ears right and what hit your gut wrong.
That's the true judge of music. Besides, I doubt Vai goes to your church, anyway, so folks ain't critiquing, they're just listening.
Keep your quest for knowledge, but don't lose your feel in the process (I'm only saying that because I know dudes that can shred, but can't play anything with soul).
Good times.