Use an electrically isolated thermocouple when there could be a shock hazard or when any voltage present at whatever the thermocouple junction is attached to could interfere with the circuitry that's reading the small thermocouple voltage.
When thinking about shock hazard, also consider...