To understand why quartz is so useful for electronics, we need to understand piezoelectricity. Wikipedia defines piezoelectricity as such:
image: CC BY-SA Tizeff
Piezoelectricity is the electric charge that accumulates in certain solid materials (such as crystals, certain ceramics, and biological matter such as bone, DNA and various proteins) in response to applied mechanical stress. The word piezoelectricity means electricity resulting from pressure and latent heat. It is derived from the Greek word piezein, which means to squeeze or press, and ēlektron, which means amber, an ancient source of electric charge. French physicists Jacques and Pierre Curie discovered piezoelectricity in 1880.
The piezoelectric effect results from the linear electromechanical interaction between the mechanical and electrical states in crystalline materials with no inversion symmetry. The piezoelectric effect is a reversible process: materials exhibiting the piezoelectric effect (the internal generation of electrical charge resulting from an applied mechanical force) also exhibit the reverse piezoelectric effect, the internal generation of a mechanical strain resulting from an applied electrical field.
In electronics, the piezoelectric properties of quartz are used in the form of a crystal oscillator to provide a stable and reliable timing reference. Quartz's reference frequency is used like a drumbeat for digital processors to follow along with. It keeps software instructions moving along at a consistent rhythm!
A crystal oscillator is an electronic oscillator circuit that uses the mechanical resonance of a vibrating crystal of piezoelectric material to create an electrical signal with a precise frequency. This frequency is often used to keep track of time, as in quartz wristwatches, to provide a stable clock signal for digital integrated circuits, and to stabilize frequencies for radio transmitters and receivers. The most common type of piezoelectric resonator used is the quartz crystal, so oscillator circuits incorporating them became known as crystal oscillators, but other piezoelectric materials including polycrystalline ceramics are used in similar circuits.
Read more on Wikipedia