i usially settle problems like this by beathing the **** out the car with a baseball bat and breaking empty beer bottles on it
its probably what someone already said your 02 sensor. your car has diagnostics on it, take it to Autozone, they have free engine light check will take 2 min, it will tell you exactly whats wrong. actually you might have ecm malfunction, it can be anything, get it checked again.