I only have anecdata about this, but every taxi driver (50+) I've ever discussed CC vs. cash (this is in NYC and limited to medallion taxis) has said they prefer cash every single time.
That's mostly because of the 5% CC processing fees on every transaction, as well as delays in receiving their money from CC transactions.
I imagine it's different elsewhere, but not (at least AFAICT) where I live.
Edit: rather, it's easier to not declare cash income, than income from credit cards. Also keep in mind that the taxi company may take a cut of the revenue too.
In NYC medallion cabs, all taxi rides are recorded by the taxi meter in each car. It records the distance and the fare charged, regardless of payment method.
So that's not really the issue.