How long should my chain last?

As with most questions that ask how long something should last, the answer is..."It depends". Since we feel like we'd be remiss in doing our jobs if we let it go at that, we'll tell you on what it depends:
1) Care of the drivetrain. Chains on bikes that are well cared for last much longer. If you regularly clean and lube your chain you will be doing a lot to make it last longer. You also need to be careful that you are using the right kind and the right amount of lube. In general, stay away from heavy lubricants such as WD-40 and the like. They can actually accelerate wear by attracting dirt and dust to the chain. Similarly, too much lube can do the same. You only need a thin coating of lube on the chain. In fact, the lube that you can see and feel isn't doing you any good. The only lube that counts is that that is down in the rollers of the chain. (The best way to lube the chain is to apply a thin coat of lube to the rollers--along the top of the chain, that is--let it soak in for a couple of minutes, and then wipe away the excess.)
2) Riding and shifting style. Riders who are careful about changing gears before putting the chain under a heavy load (such as shifting before, rather than in the middle of, a steep grade) and who are "softer" on the bike in general will see much longer wear. A big factor in this is staying away from "cross-chaining": riding in gear combinations that put a big side load on the chain. On a mountain bike, stay away from the big chainring/largest cogs combo and the small chainring/small cogs combo. If you're in the big chainring and find yourself needing to use the largest 3 or so cogs in the rear, shift to the middle ring. Likewise in the small ring and smaller cogs.
3) Rider size. Chains are prejudiced against bigger riders. It may not be fair, but a 220 pound rider will wear chains faster than a 100 pound rider.
4) Terrain. You will go through many more chains here in the mountains of Southwest Virginia than you would in the flats of the Midwest. Again, it's all about shifting loads.
We see a HUGE discrepancy in chain life, from a few hundred miles to a couple of thousand or more. Again, proper care and a little thought go a long way.
So What Happens When My Chain DOES wear out?
Well, first and foremost you run a much greater risk of breaking the chain while riding. A riding buddy once broke his chain SIX times in one ride because he was trying to eke a little more life from it. It didn't work so well (and we ended up riding a very nasty downhill in Harrisonburg in the dark with no lights--thanks, Chris Lenth!). Your bike will also not shift as well. A worn chain has a lot of play, and that causes it to react more slowly.
Most importantly--at least from a financial point of view--is that riding a worn chain can wear the other parts of the drivetrain, namely the cassette and chainrings. Modern cassettes have teeth that are intricately shaped to help the chain shift from cog to cog more smoothly. This is great for shifting, but it accelerates wear. A chain that has worn and stretched out will try to wear those teeth to the chain's new "profile", and those shaped teeth give in fairly easily. Replacing the chain before it gets significantly worn can save these other components and save you a bunch of $$$.