Pruning trees is really an art. You have to know when to prune a tree why it needs to be pruned, and the when and why can change drastically between species. Pruning is done to keep the tree healthy, enhance fruit production, remove dangerous sections, and spur new growth. Sometimes, knowing what to do is simple, but most of the time, you're better off calling a tree service to handle the pruning.
Some trees produce a lot of sap in the winter or spring, and if you prune off branches, you're going to get sap running down the tree and covering cars and whatever else is under the tree canopy. This can be a mess to clean up. For those trees, you need to time pruning so that it does not coincide with sap season. An arborist or tree service will determine if a tree species needs to wait for pruning because of sap.
Flowering and Fruiting
Flowers are what lead to fruit and seedpods, so if you have fruit trees, you don't want to prune off whole branches after they've started flowering. Remove all the flowers, and you remove the possibility of all that fruit. Now, there is a type of pruning that you should do after the tree has flowered but before it's started to set fruit, and that's blossom thinning. The more blossoms there are, the more competition there will be between the blossoms for nutrients and water. Thinning the blossoms by removing some here and there (usually in a pattern, like every small blossom or every third blossom) lets the remaining blossoms get more nutrients and produce better fruit.
Excessive heat stresses out trees. The heat dries out water sources and dehydrates the tree, and if the tree is already under stress, the combination of these two factors can harm the tree. When you prune a tree during hot weather (in other words, summer), you place it under stress not just from the heat, but from the fact that pruning makes the tree want to grow more leaves and branches. And if the tree is trying to grow, it's under a lot of physical stress. Pruning just before or during a hot season is terrible timing.
Pathogens, Pests, and Problems
The only time you should consider calling a tree pruning service at any time of the year, regardless of tree growth stage, is if the tree has a disease, has pests, or has sustained damage somehow, and the damaged area poses a threat (which, in the case of damaged branches about to fall down, is always a threat and should never be ignored). Pests and diseases can spread to neighbouring trees; if a disease or pest can't be handled through gentler methods, you'll have to remove the affected part of the tree at the very least as soon as possible.
If you're ever unsure about when to prune, or if the pruning has to be done on a spot on the tree that you can't reach from the ground, call a tree service that offers tree pruning services. Don't put yourself in danger, and don't attempt to prune what you can't reach or can't see.