When the thermostat light is flashing or on during normal operation, this indicates the outdoor unit is "locked-out". This means the outdoor unit has shut itself down because of a problem and it sends a signal to the thermostat, letting you know there is a problem. When this happens, the indoor unit tends to keep on running because the indoor unit doesn't know there is a problem.
When you see the light flashing, it flashes a code. Count the number of flashes, usually between two and nine and then it just repeats itself. You can now reset the system by turning the thermostat "off", waiting thirty seconds then back "on" again. This should restart the system but may take up to 10 minutes. The light should also go out. After 10 minutes, see if the outdoor unit is running. If the light doesn't go out or if the unit doesn't start, you may need to call for service assuming you checked for the obvious, like tripped breakers or the outdoor reset button.
Sometimes a unit will "lock-out" on a fluke or a weather-related condition and resetting will solve the problem. But if the unit "locks-out" again, most likely there is a problem and service will be needed.
Below is a list of possible causes.