It sounds like your battery is going bad. When cars have a built in alarm system when the battery is bad the alarm messes up or its your alarm system. When the alarm system is messed up it keeps the car from starting. Also when the alarm is messed up the car dies out.
You need to take it back to the guy you stole it from... Just kidding!! A couple of things I can think of will cause this. One; a low battery or bad battery will do this. It is a warning to keep and eye out for the battery going totally out, as this could cause you to get locked out of your car, and with a dead battery it is not an easy feet to get in. Two; Your voltage is falling below acceptable levels as in with a bad alternator. I believe it is designed into the vehicle to keep one from taking their own car when the battery goes dead. Look for a voltage drop, such as corroded battery terminals, slipping fan belt not turning the alternator fast enough to keep up with demand at times. Find this problem and you will solve the mystery! Good luck!
Had the same issue occur randomly with my 2000 LS. Drove me nuts. The connection for the power seats (located under seats) is attached to body with a metal clip. This metal clip would lose connection to body; and security light would come on. I re-bent clip to have move grip and sanded a little paint off this area body. Two bolts accessed from back seat gets your front seats out.