Has this engine been modified in any way, shape, or form? A cold air intake, performance chip, header, or free flowing muffler will often cause the check engine light to come on.
Have you erased the trouble codes with an OBDII code scanner after doing the repairs? If you just disconnected the battery to clear the codes; they will come back. Cars made after 1996 cannot have codes cleared by disconnecting the battery.
Have you had the codes read. The code that causes the light to come on will still be in the computer's memory even after the light goes off. That code can be read for free by some parts stores (like Auto Zone). The code will tell you the source of the problem.
If the engine has not been modified; I would think that bad spark plugs, a bad coil, bad plug wires, or a vacuum leak, or a disconnected or plugged EGR valve might cause this problem.