Dodgy coil or moisture in the distributor cap. Remove the cap (make note of what HT leads go where) and dry it throughout with paper towel. Refit, spray WD40 all over it, and inside the pins where the HT leads connect to, spray the HT leads themselves (inside) and refit. Try that, if it fails then start looking at coilpack (they are very commmon to go in these engines) or maybe something more serious like a bad sensor somewhere.