The simple answer is "we are not sure".
There would appear to be some hereditary component, as Burmese cats (and their crosses) seem to be predisposed to the condition - a recent study showed 92% of cases were Burman. However other breeds, Tonkinese, Siamese and the Domestic Short Haired can be affected.
There are some similarities to a condition called Trigeminal Neuralgia in man. The Trigeminal nerve conveys sensory information (such as pain and touch) from the face to the brain. Normally there is a central disinhibition of these signals, however in affected patients there appears to be reverberation and escalation. The perception of pain appears far greater than would seem "justified" by the stimulus. One particular form of the condition, Glossodynia, is known as "Burning Mouth Syndrome". The sensation is that the tongue is on fire. When you observe cats trying to claw their own tongues, appearing to want to rip them out - anthropomorphically cats do seem to be suffering the same sensation.
Triggers appear to be linked to Oral Problems (63%), erupting pernament teeth (16%). Periodontal disease and tooth resorptive lesions are also commonly associated factors. Cats that have had "difficult" extractions appear to be predisposed, one of the commonest links is where "atomisation" has been used to remove tooth roots. This is an outdated procedure where high speed drills are used to atomise roots - spinning fragments of tooth root into the surrounding alveolar bone.
Stress is another common factor in affected cats, especially social stress - for example in multi-cat households, or with neighbouring cats.