A bad O2 sensor can cause the check engine light to come on, rough idling, poor fuel economy, and engine misfires.