One thing a lot of guys overlook is the fact that about 95% of tone is in the fingers. This is something I never really believed in until after about 15 years of playing and 'tone' searching.
Vai will always sound like Vai whether he plays through a busted up Epiphone or a signature Jem. The sound quality will be different but the technique will sound the same and technique is what makes a player sound tight and is the secret ingredient in achieving good tone.
Equipment is important or course, Kevin gave some very good tips above. Pickups are the most important part of the hardware equation, my very first guitar was a wrecked 10th hand Charvel. The pickups were stock and it was muddy as hell, as soon as I swapped them out for a set of Dimarzio's things sounded infinitely better. I still sounded bad but the improvement in sound (as opposed to my playing ) kept me motivated to keep on practicing and improving.