My car used to do this occasionally; especially on a morning.
First thing'* first, check the battery cables. My car started, then completely shut off, lights and everything. I took it to auto zone, they hooked it up, and I turned it on fine. But the meter said I shouldn't have enough power to start the car.
Turns out it was just dirty battery cables. so take the cables off and make sure there'* no buildup on the terminals or the cables. Then put them back on SECURELY! Then, try to start. It should start right up like normal.
Sometimes, this didn't help me either; so I figured this out.
What I had to do was pop the wires off of each spark plug and put it back on, one at a time.
[The plugs are on the left of the engine, labeled 1,2,3,4,5,6 for each cylinder]
This should get the car to start, unless something more than a bad connection is going on.
By the way, if you have to resort to the plugs, make sure you put them back on in the right order, or you'll have a misfire in 2 or more cylinders. The best way to make sure you don't mix them up is only do one at a time.
Hope one of these works out for you.