Necessary pruning should be done as soon as can be managed. When pruning large amounts of foliage or more than one third the crown mass, pruning should be avoided during the dry hot months. Dead and diseased wood can be removed anytime. The best time to prune is when the tree or shrub is dormant, usually in the winter months.
The images above show the proper way to prune. Images provided courtesy of the Virginia Cooperative Extension Service.