When you start to see a hole in them, and before the hole goes through the fabric of the shoe, otherwise it will just cost more to get them resoled and to fix the hole in the fabric rather than just resoling them.
The most common place for holes is in the front tip of the shoes, where your toes are. This is usually due to either poor footwork, or just the lifespan of the rubber on the shoes. Softer shoes with soft rubber tend to wear out faster. Once you start to see a hole, you may have a few more sessions left before the hole really becomes bigger. Waiting too long though can just cause the hole to expand and eventually there will be a hole in the actual fabric of the shoe, which usually is also fixable, but just costs more.