Attaching a thermostat to an air conditioning unit has no electrocution risk due to the low voltage used, but some heating systems use wires carrying a potentially deadly amount of power. Older systems are especially dangerous.
Home heating and cooling systems vary dramatically in power. Some systems use 24-volt lines, while others might carry 110 or 220 volts of current. While 24-volt wires can cause painful shocks, 110 and 220 volt wires can cause severe burns and even death.
Some standards make replacing a thermostat relatively safe for those who understand the basics of electricity and basic safety guidelines, but manufacturers might use different components, potentially causing confusion for the inexperienced. In addition, simple mistakes can also damage equipment, leading to expensive repairs far above what it would cost to hire an expert.
Older systems are often more dangerous than newer systems. Regulations were less stringent in the past, and custom installations may rely on non-standard wiring. Furthermore, wires degrade over time, and their insulation can break down, leading to high risk of shorts and arcing.
Experts typically advise homeowners with systems that use high voltage and those with older systems to hire an expert. Fortunately, thermostat replacements are fairly quick tasks, making the cost of bringing in expert help small compared to the efficiency gains newer thermostats can yield.