Fuel or fire. Its likely one of these.
Check the fuel filter. Clean injectors. Check fuel pump pressure.
Lots of electrical reasons for it to fail. Had a friend with an old civic that the ECU became temperature sensitive. On a hot day he had to open the doors and fan behind the glove box for a while and it would start. It would crank just not start and he had one shot at it because the more he cranked the longer it had to sit before it would eventually crank. Yea thats crazy! Replaced ECU problem solved.
Not likely a single plug wire causing this.