This question is asked a lot. We find a good rule of thumb is to trim after the bloom time of the shrub is done. For example, Rhododendron, Lilac, Forsythia, and Purple Sandcherry all bloom in spring. So you would prune these after they are done blooming in spring. If you prune earlier it could stop these shrubs from blooming at all. Otherwise early spring is recommended for most other shrubs. Just shape to form. That way you can trim any winter damage. Hydrangea are the exception because of the older
varieties only bloom on old wood or stems. So if trimmed too much you will trim all the buds off. Also never trim an older shrub down over half its size. It's better to trim more times through the summer to get a shrub back to a manageable size than to do it all at once. Never trim during drought periods or when extremely hot. Mornings or evenings are good times to trim. Some shrubs need the growth over summer to get them through the winter so be mindful of that. Good Luck!