When it won't start, does it crank but doesn't fire up?
At those times, you should do a few tests
Turn the key to the on position and listen for the fuel pump to prime fuel rail
Check for spark. Check for injector signal or feel for injectors to fire.
When was the last time the timing belt was changed???