When Should I replace the rotors on disk brakes?
Normally the manufacturer of the brakes gives some minimum value for the rotor thickness. For higher prized brakes they often even provide some gauge that lets you easily check if the rotor is still thick enough.

Typically the minimum thickness might be somewhere below 2mm (I believe to remember that the absolute minimum for Magura discs should be 1.7 or 1.8 mm). But as said, this should be an information that should be in the manual fo your brakes.