No idea what the vehicle is so I am taking an experienced guess at what the problem is. Its the plug wires and or the distributor cap and associated parts.
They are bad and letting moisture penetrate.
If you recently put new wires, cap etc then its poor quality.
Carry a can of WD40 or similar product, next time it won't start spray the plug wires and or dist cap and if it starts, replace with all new parts. WD40 etc displace moisture and that will allow it to start. Keeps spraying anthing that is electrical till it starts.
Seen this before on some old 90's Fords we had at work. Eventually the parts will fail and then you have to replace them. Use AC Delco, cheap imported ignition parts often will be just as bad as worn out parts.