You are lucky to have had such good luck with your lavender plants. They must like where they are growing.
If left unpruned, lavender plants eventually become floppy and sparse. Annual pruning keeps them neater and more compact. This can be accomplished by shearing or by pruning individual stems.
In areas with colder winters like we have in the Shenandoah Valley, do this pruning in the early spring; in areas with milder winters, they can be pruned right after they finish flowering.
Prune to remove the old flower stems, removing at least one inch of the leafy growth below the spent flowers.
Old, neglected, overgrown lavender plants cannot usually be rejuvenated by more severe pruning; they should be replaced with young vigorous plants. This may be the best course of action if they have been in the ground for many years. You can try pruning them this spring and see how they respond. If they don't flush out with nice new growth, consider replacing them.