Jon Murphy recently posted an explanation for why he is skeptical about the use of taxes to offset market failures. His reasoning was that the use of tax policy will inevitably be distorted by political incentives, and such incentives may not be at all aligned with what is socially beneficial.
I agree this is a major issue. One of my favorite recent explanations of this problem came from Scott Alexander. Alexander used the example of how in theory, taxes and subsidies could be used to nudge people into eating a healthier diet.