There is a "transponder" that uses radio waves to talk to your ignition key.
When it recognizes your key, it tells the alarm system module it is ok to let
the car start. Could be this is going bad.
If your transponder quits working, when you try to start the car, the key
turns in the ignition, but all the electronics quit - lights, fuel pump,
engine, everything shuts down.
If your symptoms are different, post a message detailing your symptoms, we
can try again.