It could be many things, unfortunately and without experiencing the problem first hand or being able to do some basic diagnostic tests its hard to say. First place to start is to see why the check engine light is on, retrieve the codes and see what they indicate as being the problem. Then check the basics, is the ignition system contributing to a misfire (spark plugs and ignition system in good order?), is there a vacuum leak from the intake manifold or air induction boot?, or is there an engine mechanical problem, (maybe a tight valve or reason for low compression in a cylinder, perhaps a bad fuel injector. Too any possibilities to be able to guess at without doing basic tests.