Disregarding megapixels, is the nikon d3100 much better than the d5000?

What is the difference between the two cameras?

The D3100 also can shoot 1080p video (D5000 is limited to 720p) and has a higher resolution screen (but the D5000 has an articulating screen).
In my personal opinion, I'd honestly just go with the one that's cheaper. I don't shoot video, and while the high resolution screen is very useful (I've a good one on my Canon 50D), it's not worth a big price jump to me.

Yes. 2 More megapixels (but same image quality), lighter, smaller, has auto focus while recording videos and better frame rates, higher ISO range and less noise.
Here's a post called 'Buying a DSLR, what's important, megapixels, features, brand, price, quality and which one to buy - http://www.the-dslr-photographer.com/2009/03/which-dslr-to-buy.html
The site has many more tutorials, tips, reviews and guides!