It matters if you want to prune your flowering shrubs annually or from time to time and make sure they still flower.
A very common cause of a shrub apparently failing to flower is pruning it at the wrong time and inadvertently cutting off the embryo flower buds.
Flowering on old wood means that the shrub makes its flower buds the previous year on existing (old wood,) branches which then flower in the spring. There is always a temptation to prune in the spring, but if you prune any of the shrubs which flower on old wood, you will cut off the flower buds as well and be left wondering why it didn't flower.
My Rosemary hardly ever flowers because, in effect, it gets pruned all year as I pick the stems for cooking as a result it barely gets chance to form any flower buds.
All shrubs which flower on old wood should be pruned after flowering which for many is late spring or early summer, but only after flowering.
Shrubs which flower on old wood are:
Forsythia, Rhododendron and Azalea, Rosemary all illustrated above and Magnolia, Hamamelis Witch Hazel, Lilac, Philadelphus, Spiraea, Viburnum, Weigela, Winter flowering Jasmine, Lonicera fragrantissim the winter flowering honeysuckle, Deutzias, and Camellia. Hydrangeas are complicated because there are different requirements within the same plant group as some flower on old, and some on new wood. Hydrangea macrophylla, the mop heads and lace caps, flower on old wood and should only be trimmed. Check out How to Grow Hydrangea for pruning information. Hydrangea paniculata flowers on new wood so has different pruning requirements.
If in doubt,
a) do not Spring prune any shrub which flowers before June
b) look closely to see if you can see flower buds and if so, put the secateurs away.