The “action” of your guitar — meaning the height of the strings off the fretboard — definitely affects your guitar tone. The higher the action, the more open your instrument sounds. High action can often increase sustain and give your notes a nicer resonance than a lower action. This is particularly obvious on acoustic guitars.
The drawback is that higher action is harder to play than lower action. It’s harder to fret, and if you’re a shredder, it makes it harder to both move fast and to do tricks such as hammer-ons. So when you’re setting up your guitar, you’ll want to find the best compromise for your skill, taste, and style between the richer tone of a higher action and the playability of a lower action.