This is usually caused by the absence of AC power to the smoke alarm.
It's likely that the circuit breaker has been tripped or the black wire has become loose in the wire nut, and the smoke alarm is operating exclusively off the battery. The alarm will run off the battery for about 25 days before it will require replacement. If your smoke alarm is not indicating that AC power is present, check the circuit breaker and/or have an electrician check the circuit.
If the alarm sounds immediately when connected to the hardwire, but not when running solely on battery, you either have a non-Kidde unit on the circuit or the white wire has come loose out of the wire nut.