As a rule of thumb, yes. Your house will retain its heat for several hours after the sun goes down and the temperatures drop (if well-insulated), so there is little point in leaving it on all night. However, having a programmable thermostat will keep you from having to manage when the heat pump is needed. Instead, the heat pump will work when it is needed, according to the thermostat’s temperature reading.