There are two main varieties of phlox -- creeping phlox and tall garden cultivars. Both benefit from pruning once their flowering cycles complete. Blooming and pruning times differ between the two varieties, and some types may require multiple trims because they flower more than once.

...
Creeping phlox looks better when trimmed after flowering.

Benefits of Trimming

Phlox flowers begin producing seeds once flowering stops. Seed production takes energy from the plant which prevents the chance for a second flowering period in some varieties. Dead flower heads are also unattractive and can attract pests to nest on the plant. After-bloom trims improve both the vigor and appearance of your phlox plants.

Creeping Phlox

Creeping phlox grows as a ground cover plant, producing the its flowers in a low mound on top the foliage. The plants flower profusely in spring, but most of the flowers begin to fade after temperatures warm in summer. Trim back the spent flower heads and overgrown stems once the flowering cycle is complete in early summer. You can prune up until late summer, but the foliage grows lusher and the plants look less unkempt if they are pruned immediately after blooming.

Tall Garden Phlox

Tall phlox varieties produce their flowers in clusters atop long stems for a period of six weeks in early to midsummer. Trim out the old flower heads once most of the blossoms on the cluster have wilted immediately after blooming. This variety of phlox will set seeds, which produce seedlings that rarely resemble the parent plant. Immediate trimming may also lead to a second set of flowers. If your variety blooms a second time in late summer, trim them again once flowering halts.

Fall Trimming

Phlox only requires fall trimming in areas that experience minimal winter snowfall. Creeping phlox remains evergreen so it never requires trimming in fall. In areas without heavy winter snows, cut back tall phlox varieties once the plants die back naturally in late fall or early winter. Prune the plants to within a few inches of the ground. In areas with heavy snows, wait to cut back the plants until late winter, as the dead plant material protects the phlox crowns from snow damage.