Don't people selling illegal drugs have to pay taxes already? I always remember being told stories about how the IRS had this whole system set up to collect taxes from drug dealers while looking the other way.
I can see that enforcement/compliance with that would be pretty low (compared to a brick-and-mortar business), though.
Certain legal industries (especially cash ones) have atrocious compliance--the restaurant industry for example--so I doubt compliance in illegal ones exists in any meaningful capacity, but yes they have been subject to certain taxes during criminalization. The IRS is prohibited from sharing tax information with some agencies, but I don't know if that's in totality or certain situations. (I do know that they can't share taxpayer information to report on a taxpayer's immigration status, for example.)
There are also new kinds of taxes that can be levied on a recently legalized product, namely excise taxes. (IANAL so I don't know if current sales tax laws apply to sales of illegal products.)