Paul Reed Smith has videos available where he talks about the effect different woods have on the sound of his electric guitars.
(starting about 2:47 into the video)
He demonstrates by tapping the rosewood neck and fingerboard and mahogany body blanks. If the wood was pine or balsa it wouldn't sound anything close to what you'll hear as the wood resonates because the wood would absorb the vibrations instead of resonate with or reflect them.
Instrument builders over the last several hundred years have learned that certain woods have certain effects on the instrument's sound, whether it's a drum, a clarinet, a violin, a piano, or a guitar. The density of the wood controls its sound, and its ability to resonate and reflect or absorb the vibrations caused by the string vibration, or the column of air, or the strike of the membrane. The builder relies on those to control the sound of the instrument.
The woods aren't just ornamental, as the idea that wood has no affect on the sound would imply, otherwise we wouldn't see so many common uses of certain woods for caps or bodies.
(starting about 1:30) has more on how PRS guitars are picky about the wood and that it affects the tone and 4:30 for PRS himself talking about the wood affecting the sound.
Similarly, Rob Chapman discusses how wood affects the sound of his guitars in
One of the things I do when auditioning new guitars is to play them without plugging them in. That lets me hear how the guitar itself affects the sound. Take two identical electric guitar models that are identical in their wood types, play them "acoustically", and you can often hear differences, even though the strings, frets, tuners etc. are supposedly the same. At that point, the difference is very likely the wood.
So, don't discount the effect of wood and wood quality and a luthier treating it right.