An old air filter that is dirty can cause a check engine light and can cause the engine to experience rough engine idling as the engine won't be able to get enough air flow into the engine that it needs to run properly.
Roughing idling can also be caused by bad spark plugs, low fuel pressure, bad ignition coils, bad spark plug wires, incorrect timing, bad timing belt or timing change and even a bad O2 sensor or clogged fuel filter.
A dirty air filter can also cause O2 sensor problems indirectly and can also cause bad Mass Air flow sensor readings which can mess up the o2 readings.
When an air filter is dirty or clogged it restricts the airflow to the engine and can result in a rich air/fuel mixture, which can also foul the oxygen sensors and trigger a check engine light.
When the air flow is restricted, the engine computer or ECM may not be able to maintain the correct air/fuel ratio and result in a rich mixture which would be too much fuel and not enough air.
A rich air and fuel mixture getting to the engine can result in excess carbon deposits and other contaminants in the exhaust system and the contaminants can also foul out the oxygen sensor and can cause the oxygen sensor to provide inaccurate readings to the ECM.
And the check engine light may be triggered as the ECM detects abnormal readings from the oxygen sensor.
The symptoms of a bad air filter include poor acceleration or increased fuel consumption, unusual engine noises, check engine light, misfiring, decreased acceleration, sometimes black smoke from the exhaust and reduced engine performance.
If the air filter is really clogged then the clogged or dirty air filter can cause your car to jerk as it can restrict airflow to the engine and hinder the combustion process although a dirty air filter is not the common causes of a car to jerk but it can be a cause of car jerking.
A vehicles air filter ideally should be replaced at least once a year or every 12,000 miles or more often if you do a lot of driving in dusty conditions.
A dirty air filter can reduce your fuel mileage and cause poor performance as the engine cannot get the air it needs to operate.
I always replace my engines air filter on my vehicles every year unless it gets dirty before then.
A new air filter is pretty to install and are often not all that expensive either.