Hi Lavoy,
Beginner on electric here but I love to browse around. Please take my view with a BIG pinch of salt:
First of all, the theory/narrative is different for electric, classical and acoustic guitars. And there might be differences on cleaner vs more distorted tones for electric guitars. I'll focus on electric.
Guitar Amps (more specifically the sound speaker of anything if you're using plugins or live on stage) take a huge role in guitar tone. To say 50% will be an understatement but how high there might be debates (the percentage isn't really important in my opinion. The immediate after is Pre-/post-FX and EQs.
Then, I'll see a combination of guitar pickups, the player('s style and skills) and guitar construction (especially on the side of acoustic feedback to the player - but NOT tonewood). Why I say it's a combination - because the "sound" we hear affects how we play. The guitar pickup is like a mic (like how the amp is mic'ed during recording). We will inevatibly be affected and adjust our touch with it - same for the guitar construction. Some electric guitars are very well built that the (combination of) neck/fretboard/body wood material can give vibrations simliar to classical/acoustic when it's played to the player. Needless to say, the fretboard quality needs to be top notch (no fret issues, sprouts; very smooth and fitting to personal taste).
One myth that has been debunked in my opinion is the "tonewood" for electric guitar (has to clarify that it affects more more the other two types instead). Some people may still disagree, but I would believe that the more distorted the tone is (again, electric guitar), the less important tonewood is to the tone.
I have the first hand experience, which is almost like and A-B test. I brought my own guitar (some call it "session weapon") to my teacher who almost didn't play it at all. Obviously, he is familar with the classroom setup (amps, everything) way more than me. We play on the same piece with my guitar and it sounds totally different, but I can still recognize the pickup identity (though I cannot verbally describe it of course).
Venue size also plays a role (feedback, echo, reverb, relative placement of all things, listener, mic, etc) but the overall identity retains unless we set values or allow room parameters to go to the extreme.
With all these said, I think the "great" tone argument goes immediately to what Tomo said in various videos about practice amp tone setting. Say, for clean tone, the first thing to do is to pick a good amp (or plugin "veg burger" which is essentially modelled after those expensive amps). Then, we need a good guitar pickup and well built guitar to set the overall identity. Next, we need a good player. Voila!
It is something that a beginner like me can understand but the devil lies in the details (otherwise there won't be heaps of products in generations). It's the same for distorted sound, but when we add effects, etc - they function as variables which exponentially complicate things. The only comment (more like speculation) I can give for distorted sound is that more pedals do not mean better. I run plugins with various presets and saw that not everything is used at the same time, nor the knobs are turned up (e.g. in some Japanese Pop/Rock songs, they use chorus and delay, but it's set so low that it felt invisible to the listener. However, if you remove it, the player immediately can feel it and it's not the tone.)
Hope you like it!
Hugo
[EDIT: In case it's too abstract/look meaningless, I'll exemplify with the John Mayer plugin (which I use for practice now). I run the exact settings with Tomo's secret tone video (i.e. essentially with 1. lowered bass and bringing up treble; 2. no pre-/post-fx and esp. no gate and compression; 3. quite loud volume on the amp (if hit on full force, it's too loud - that's it); 4. guitar's volume on 8 (which we can do small adjustments) and tone on 10. The tone is fantastic - especially for styles that rely on the player's prowess on feel, touch and dynamics. Broken chords - that's what I practise/play with.
Then, we can consider adding reverb and/or delay... whether it needs a little more drive in certain song sections (the famous Ibanez green one.. TS-8?), compression/noise gate if we're not practising, etc...]