Congress has power under Article I, Section 8 to lay and collect taxes, duties, imposts and excises, to pay the debts and provide for the common defense and general welfare. Under the 16th Amendment, Congress can collect taxes on incomes that are derived from any source. As long as Congress has the power to regulate a particular activity that it wishes to tax, it can use the tax as a regulating device rather than in order to raise revenue. Even if Congress lacks the power to regulate a particular activity, the tax will be upheld if it has the "dominant intent" of raising revenue. In other words, even if a tax might have a substantial regulatory effect, if it raises revenue, it will be considered valid.
See congressional power, income tax.