Check engine light pop up because of many reasons. I will share what I know and I have experienced:
Oxygen Sensor: If the oxygen sensor is not providing correct data to the system, it decreases the gas mileage. It always needs to respond properly. And if it persist any issue, you will see check engine light on the dash. In this case, you need to replace the oxygen sensor of your car.
Gas Cap: Sometimes the gas cap, if it’s loose or broken it is indicated by the check engine light. Get it replaced.
Catalytic Converter: If there are access exhaust gases in your car and the catalytic converter is unable to exhaust the gases out of the car, it damages the performance of the car badly. But if your car has such an issue, check engine light can be helpful.
MAF Sensor: If the MAF sensor is at fault, it does not read the proper amount of fuel needed in the car engine, which automatically decreases the gas mileage. But you can examine the same if the check engine light is on.
Spark plugs: Sometimes the spark plugs are faulty or damaged which ultimately pop up the check engine light on the dash. If this is the case, it’s always recommended to replace it asap.
Coolant Leak: Coolant leak is really dangerous for any car. It damages your engine severely and you end up replacing lot of engine parts. Depending upon what amount of coolant has been leaked; you can either repair or replace the engine parts like radiator, water pumps and many more.
I know these things which can cause check engine light on the dash. In any case, if you cannot examine fault on your own then you should better hurry to a garage or your service center.