When a string is plucked, it vibrates at a certain frequency, which is determined by the string tension and the scale length. The thicker the string, the lower the pitch. The shorter the scale length, the higher the pitch.
The pitch of an electric guitar can also be affected by the use of effects pedals, such as distortion and wah-wah pedals. These pedals can change the sound of the guitar by altering the frequency of the vibrations.
The pitch of an electric guitar is important for creating the desired sound. A guitar with a higher pitch will sound brighter and more piercing, while a guitar with a lower pitch will sound warmer and more mellow.