|Fire together Wire together (source)|
One theory is that neurons strengthen their synapses based on the specific timing between receiving a signal and firing an action potential. This is called Spike Timing Dependent Plasticity (STDP). The basic premise is that if neuron A fires first, and then neuron B fires, neuron A is probably partly responsible for neuron B firing. If this is the case then the signal from A to B probably contains meaningful information.
|Neurons Connecting (modified from here)|
And the opposite? What if neuron B fires before neuron A? It could be a meaningful signal or it could just be random noise. Maybe neuron A fired for no good reason (or even just a little vesicle of glutamate popping out untriggered). Many studies show that when B fires before A, the connection was actually weakened.
So the saying perhaps should be 'neurons that fire one right after the other wire together' ... But that just doesn't flow off the tongue the way 'fire together wire together' does.
STDP is incredibly complex and even though this A before B = strengthening and B before A = weakening explanation makes intuitive sense, there is an exception for every rule. Some studies find just the opposite! And some studies find that both directions strengthen the synapse (A-B and B-A).
Dan and Poo (2006) have a nice table explaining these exceptions and the parts of the brain where they are found.
Bi G, & Poo M (1999). Distributed synaptic modification in neural networks induced by patterned stimulation. Nature, 401 (6755), 792-6 PMID: 10548104
Dan Y, & Poo MM (2006). Spike timing-dependent plasticity: from synapse to perception. Physiological reviews, 86 (3), 1033-48 PMID: 16816145