You are right to prune spent flowers of your peonies. This is a procedure gardeners call "deadheading." The purpose is to prevent the plant from wasting its energy producing seeds, which could be better spent strengthening the roots for next year's blooms.
The best time to deadhead is when the flowers no longer look good. Not all peony flowers open at the same time, so cut them off a few at a time as they fade and/or wilt. That way the plant will look better as the remaining buds continue to open.
