I'm with Waz. The wood and the finish do have a contribution to the tone, but I'd say most noticeably to the sustain. Thin finishes do sound better than thick ones (which can really limit body resonance), though the type of material used for the finish is probably less important. A thick nitro finish will probably have more of a negative effect on a guitar than a thin poly one.
I've had a Strat guitar body that made even expensive replacement pickups (a Bare Knuckle Irish Tour set) sound dull and lifeless, yet swapping the basswood body for an ash one, (but using all the old parts) brought the guitar back to life.
You could probably draw a distribution of guitar bodies on a chart and assign them a value from 'bad' to 'average/good' to 'excellent' sounding (all very subjective terms of course), and end up with a bell curve where most of them sit in the 'average/good' area, a few in the 'bad' and a few in the 'excellent'. So the majority of guitar bodies are going to sound OK, and swapping pickups will have a much bigger effect on the sound than swapping from one OK body to another OK body. But sometimes a body is so bad that even a good pickup won't help much. And moving from am OK to an 'excellent' body can sometimes achieve more than a change of pickups can.
It's all very hard to really pin down, as we rarely have multiple versions of the same guitar, and all fitted with the same pickups. The only time you can really try is in a large guitar shop that does have a lot of the same type of guitar out to try. And it's then that you can really tell that some of those guitars do sound better than others. The differences do show up more on the cheaper guitars, where there is less consistency between the woods used. But even on higher-end guitars, there can be noticeable differences.
But there really are far more important things to be concerned about.