One frequently hears this, or the more specific formulation "the lottery is a tax on people who are bad at math." This is short-sighted; knowing that someone bought a lottery ticket is not sufficient information for judging his or her math skills.
If the person bought it as an investment, that does indicate a problem—although whether the difficulty is with probability or planning for the future is open to question. For example, right now—November 24, 2004—the expected payout of a $1 New York lottery ticket is 93 cents, before taxes.1
However, it's perfectly reasonable to buy a lottery ticket because gambling is fun. People like to guess the outcomes of events, even random ones, and be rewarded for being right. That's part of the reason the Mandalay Resort Group's nine casinos took in $2.5 billion in fiscal 2003, according to Reuters. Few of the people betting in those casinos are genuinely doing so with the hope of getting rich; they're motivated by the flashing lights of the slot machines, the click of the dice, the psychological drama of poker, or whatever the hell it is people find exciting about Keno.
Statistically speaking, most people who play the lottery are stupid, of course, but that's just because they represent a cross-section of the population. It's just not buying lottery tickets that proves it. After all, by the same criterion, you can say the same thing about a movie ticket, which probably won't make you any money either.2
The difference is, of course, that when the lottery does make someone money, there are newspaper headlines about it.3 These inevitably focus on the money—since, admittedly, there's not much else to the story.4 This makes it look like the main point is to get money, and so all the people who know it's not a reliable way to get money snicker. It's only feeling superior to people with a different idea of fun.
If you're desperate to gamble as an investment, try betting on horse races. The similarity to the equities market is striking: both have outcomes that depend on a number of factors of which the cumulative effects are theoretically but not actually knowable.
EDIT (Dec. 18): Since this was first written, a man made headlines for winning an eight-figure NYS Lottery jackpot while he had only 18 cents in the bank. He did something stupid. However, it wasn't stupid because the lottery is a poor investment, it was stupid because entertainment expenses should be cut first in such circumstances.
1That said, unperson points out that this applies to games of pure chance; where skill is involved, it's something one can make a career out of.
2They don't even give away dishes on Tuesdays any more.
3Although I imagine if somebody won a large jackpot with a movie ticket, there'd be even bigger headlines about that.
4Until the lucky winner is returned to penury, providing the masses with delightful cheap irony.