From what i have learnt from a workshop by Maestro, literally EVERYTHING contributes to your tone and i mean EVERYTHING. The strings, the machine heads, the nut, the wood, the pickups, the bridge etc.
Certain things like the machine head material contributes/decreases sustain. Even how you coil your strings around the tuning posts affects tone. It affects how much the tension is which gives a different tone.
However to me, I can really care less on all these. Like that zesn mentioned, how to play is the most important. Take Mr. Beez for example. He can take a $300 guitar and make it sound really good with a really simple setup (guitar -> amp).