Although trees are quite resilient and may be pruned anytime, there are both practical as well as biological reasons to prune or not prune during certain times of the year.
If it is between opening up a wound to heat or opening to the cold, opening the wound to the cold is best. Optimally, the perfect window would be past February and into March. The chance of frostbite on the sensitive cambium is less, and the sap is not rising.
When certain species are trimmed during the growing season, such as American Elms or Oaks, pheromones (scents) are given off at the wound, attracting insects that can carry fungus on their bodies that can infect these trees. These trees are best pruned in the fall or early spring.
Deadwood should be pruned anytime because it is a health and safety issue. Deadwood is food for decay organisms and the quicker it is removed from a tree the sooner it can start closing the wound and preventing the spread of decay.
If the tree was planted for its spring flowers, such as magnolia, dogwood, crabapple, you will want to wait until after it has flowered to prune. Otherwise you prune flower buds off and reduce the abundance of flowers that spring.
For certain species such as maples and birches, I would trim these in the summer to minimize sap oozing or ‘bleeding’.
Pruning during full leaf is fine, but dormant season is probably still best for tree health.