check engine light comes on on 1998 Hyundai Sonata

I have noticed on a few occassions when it rains, my car starts hesitating and begins shaking and the check engine light comes on. When I stop for a light, as I am waiting, it feels like the car is going to shut down. thecar is also so jittery. The check engine stays on for the entire day. The next day, the light is off. What could the problem be?

Asked by for the 1998 Hyundai Sonata
The best thing to do is have an engine performance diagnostic test performed by a qualified technician.

My initial thoughts - vacuum leaks? Fuel pressure issues? Spark issues?