Personally I don’t think there is a wrong or right time to do this, as in the perfect time through the growing season. Being as some geraniums will have a short seasonal flowering period, such as spring or summer and some will go nearly all year long, it really depends on the individual plant and the weather. The reason I mention the weather is that if it is particularly hot or dry this will be more gruelling for all your garden plants and will take its toll on the plants vigour and therefore reduce the flowering period.
My general rule of thumb is if your geraniums are beginning to look a bit tired, if the flowers are turning to seed heads and the foliage is low in vigour then its a good time to give them at cut back and rejuvenate them.
If you have the time and the eye for detail, deadheading, removing the faded flowers, will likely encourage further flowering. Though this is not strictly true of all varieties, some, such as G. x magnificum will give you only one burst of flowers from May to June, even if you do deadhead religiously. The other advantage of deadheading your geraniums is that by preventing it from setting seed, the plants energy will be diverted elsewhere. If not into further flushes of flowers then into a stronger root sytem, which will give you a larger plant in the following years to come.
A more, thorough approach is to take your garden shears and cut back your plants to about 15cms. I tend to do this around early August, to the G. x oxonianum’s I have all along the border of my front garden. It looks brutal, but within two to three weeks they will be sending up fresh leaves and I will be rewarded with another floral display around September. (Please note this isn’t suitable for all species, I wouldn’t recommend this for cinereum’s or other low growing varieties or for young plants that are yet to establish themselves).
Another reason to remove faded flowers and prevent seed setting is that Geraniums are somewhat promiscuous. If you have a cultivar you particularly like you could run the risk of loosing it in amongst its own progeny, so you need to be vigilant. However this is how most new cultivars come about, so you on the other hand you could find yourself in possession of an exciting new variety!