Could be a bunch of things, but it might be tough to tell unless it happens again.
Any check-engine-light codes stored?
Can you make it happen again by wiggling the key? That would mean you have a flaky ignition switch.
IF it happens again, check for spark. If your spark is good it can't be the distributor.