So, I don't completely agree with everybody in this thread -- so why not jump in and tick off everybody? :-)
Abge, I'm disappointed that you support something just because it's useful, without regard to whether it's authorized in the Constitution. Why have a Constitution at all?
Moreover, I'm not actually sure that NSF funding is a good idea. Now sure -- it's definitely a better idea than a lot of the stuff we waste our money on, and it definitely does have some benefits. I wouldn't just ax it. But that said, it's not completely clear to me that the government is the best body to be deciding things like what research gets funded, let alone all the rest of the things that the money gets spent on. Probably a lot ends up getting wasted, though a lot does good. At the end of the day, I'd say it's a pretty decent idea, and I'll support it, but scientists should be less shrill about it being some kind of birthright, or people who oppose it being cretins.
All that said -- and whatever one says pro or con -- I do think it's completely Constitutional, even under pretty rigorous standards of Constitutionality. The relevant clause is the first one in Article I, Section 8:
"The Congress shall have power to lay and collect taxes, duties, imposts and excises, to pay the debts and provide for the common defense and general welfare of the United States; but all duties, imposts and excises shall be uniform throughout the United States;"
Now, there is disagreement about the interpretation of this clause, I'll admit, but even from the 19th century (see Joseph Story's "Commentaries on the Constitution" from the 1830s), if not well before, this has been widely interpreted as meaning the federal government can spend money on whatever it wants.
That does not mean it's a good idea for it to spend money on whatever it wants; and it does not mean it has any regulatory or police power it may desire. But as far as just spending money, I think there aren't a lot of limits on what it can Constitutionally do (for better or worse).
To summarize: I think the NSF is Constitutional (though if it weren't, I'd oppose it based only on that); and I think it's worthwhile, but not without risk. There's an argument to be made that the market should be allowed to determine these things, and I'm honestly very sympathetic to that argument; but there's little doubt that we've all benefited enormously from having well-trained scientists and engineers. I will say that I'm very interested to read both sides of this.