The most common reason for the check engine light to come on is the gas cap not fitting tightly. Did you fill the tank recently? If the cap isn't on tight, the pressure in the tank drops as it empties and the light comes on. When you fill it back up and screw the lid on tight, the light goes out after a few miles.