When to change derailleur pulleys?
Worn derailleur pulleys (also known as "jockey wheels") will not cause excessive wear on a chain because they aren't made of metal.

Eventually, though, the bushings inside will become worn and the outer teeth will wear down.  Park illustrates the latter progression in their article on rear derailleur overhaul.

As with many things in bicycle maintenance the only objective metric for replacing something is that it no longer works satisfactorily.  Their failure mode might best be described as gradual rather than catastrophic.  If the pulley bushing doesn't have much slop in it and the teeth are still capable of guiding the chain effectively it's almost certainly fine. If the rest of the drivetrain is in new condition and there are still issues with shifting it's probably worth giving them a look.

As far as the practical matter of replacing them goes, in my experience for the most part you need to find the manufacturer specification to track down compatible replacements.