As the link in the first reply points out, there are different types of hydrangeas. As far as timing, similar to many other shrubs, prune early blooming varieties after they bloom, later blooming varieties in winter. In the case of early blooming, translate that to those that bloom on old wood. Think of azaleas, forsythias, etc. After blooming, they grow more and develope flower buds on the new growth in summer for next year's blooms. Some, like crepe myrtle for instance, put on new woody growth in the spring and early summer, then bloom on that wood.
So, after you identify (you may already know) which type you have, then you will know when to prune. How is another story.
You can shape them up, cut them to the ground- which is usually how to rejuvenate older shrubs, or just leave them alone.
If it's worth doing, it's worth doing right. If you wouldn't put your name on it, it ain't done right!