An experienced DIY-er can install most programmable thermostats and some smart thermostats. Don't forget to turn off the breaker to the HVAC equipment! Most thermostats use low voltage wiring (except "line voltage thermostats") and involve anywhere from 2 - 10 wires, depending on your type of heating and cooling system. You will use the wires connected to your old thermostat to connect your new unit. Read all instructions and proceed carefully.
If the job requires more than just a replacement, a certified HVAC professional can ensure proper installation, as well as operation of your heating and cooling system. If you're replacing a central air conditioner or heating system, consider a thermostat upgrade at the same time - find a unit that will work with your family's habits to save you the most. ENERGY STAR certified smart thermostats have demonstrated that they save a substantial amount for most people.
If you have a heat pump, look for a thermostat with "heat pump recovery" to improve energy savings year-round. The most advanced and efficient HVAC products are variable capacity and will deliver the best comfort and savings with a matching thermostat from the same company, regardless of whether the thermostat is ENERGY STAR certified or not. Talk to your retailer or HVAC contractor before selecting the unit.
Also, if you're replacing a conventional thermostat that has a mercury switch, be careful not to break the tube that holds this toxic substance. Contact your local recycling/hazardous materials center, or the manufacturer of your new thermostat, for advice on proper disposal.