check out this site.. that should help ya
http://www.design215.com/toolbox/megapixels.php
"You can make nice 8" x 10" prints with a 6 or 8 megapixel camera, but to make a true photo quality 16" x 20" print, you need between 24 and 30 megapixels"
FWIW I do not agree with this statement. I have a 20x30 image framed in my living room that was shot with an old 6 Megapixel Canon XT that I had it it looks as good as anything I have seen from film (35mm)ever. It was a full frame image and if you begin to crop much having more than 6mp is nice for large (11x14+) images. Anything up to 8x10 and any modern DSLR will serve you just fine.
More important things to watch out for in my opinion are (for my needs) high ISO performance, focusing performance, metering, ease of use. Canon & Nikon both make great cameras. Things I'd look out for on the Nikon D40 is it's lack of a focus motor. It means you must buy lenses with built in focus motors or rely on manual focus. I don't think Nikons 50/1.8 is available with the motor built in. I'd steer you more towards finding a D80 or keep your eyes open for a D200 used. It is an amazing camera and built like a tank. I'm seeing them all the time for around $900-$1000 now that everyone is upgrading to the D3 or D300. It all depends on how serious you are and what your goals are subject wise.
On the Canon Side, the Xt & XTi are both good options, my sister just bought a XT with the kit lens on my recommendation for $500. She is shooting family stuff and not doing anything low light so the kit glass is fine. You might also consider a used 20 or 30D. Both should be available in your price range and are also a significant step up from the lower end models (XT/XTi).
Right now I think Nikon is just a bit behind Canon in the performance of their lower end (<$1000) bodies. At the high end though, Nikon's new D300 and D3 are simply stunning and finally give Canon something to worry about. I want a D3 so bad it's crazy, but I can't justify $5000 on a camera body right now.
As a general rule the big plus to the Nikon line is they tend to be more compatible with legacy equipment. I can take a 50 year old Nikon lens and it will slap right on any of my Nikon bodies. Canon does not tend to be as consistent as their products go from one generation to the next. It may sound small, but if you already have a bunch of glass it can be a big deal. Nikon also has a better speedlight system in everything from the D70 up than Canon.
Finally, someone else mentioned the Sigma 15-50/2.8 lens. I have one and do really like it. It's much less expensive than the Nikon/Canon version and 95% as good. That and a 50/1.8 will make for a nice concert shooting rig, that will also do a great job in almost any situation.
If you have other questions just ask.