Have a quick look to make sure that the battery connections are tight,
I once had a car with exactly the same symptoms, some times it started and some times it didn't, cut along story short tightened both connections, it was spot on every time after that. One connection hardly went in, the other...