I can't talk for anywhere else, but historically in the UK, all tax went into a central pot. More recently cigarette tax is earmarked for the NHS and VED (Vehicle Emission Duty [thought of popularly as Road Tax]) is ear marked for transport improvements. I'm not a fan of this - as a cyclist I was often told (at least a few times a year) but drives that I should get of the road as I dont pay for it. Ignoring the fact that I owned two cars and paid a lot of tax...
That seems to be specific to the UK. In most places I've looked into this, taxes on things like fuel and cigarettes do not go into the general fund. The reason is the taxes are meant to achieve something, and so they go towards that purpose. Otherwise it would present a corrupting influence that misaligns the incentive of the government going forward.
In the US, fuel taxes are earmarked for road building and repair, but aren't enough to pay for them at either the federal or state level. That completely ignores the negative externality of carbon emission.
Meanwhile, in a few states, cigarette taxes are actually targeted at the negative externality: health problems, including secondary smoke.
So I guess it depends on what you want to achieve. Failing to tax a negative externality like carbon emissions would seem to be corrupting influence that misaligns the entire economy.