Yes a dirty air filter can affect the way the air conditioner cools down the room.
When an air conditioners air filter is dirty and clogged it doesn't let the air in the room pass through the filter which makes the air conditioner have to work harder to cool the room.
So you should clean or replace the air filter on the air conditioner every month or so depending on how often you use the air conditioner.
If it's a window air conditioner you can just clean the air filter on the air conditioner every month or twice per month and if it's central air then you'll need to replace the air filter every month if you use the air conditioner a lot.