It all really depends on what you want to do with the camera. If you're going to be shooting in available light and can't spring for a FX camera, then the D40 will do better than either the D3000 or D3100. Less pixels in the same amount of space means that more light can be absorbed by each pixel therefore giving better low-light photos.
If you want to shoot videos with your DSLR, then the D3100 is for you.
Remember that these are entry level DSLRs so you really do want a jack of all trades which is what the D3100 really is. Its not great at anything, but its good at most things. If you want a GREAT low-light camera, you're going to end up spending over $4,000 to get a D700/D3 and a matching full frame lens. While you can get an entry level camera that adds in video features for under $1,000 with multiple lenses.
Also, I'd suggest picking up the 35mm f/1.8 if you're going to be shooting without a flash. The SB-400 is also a great addition for only $115, it gives you the ability to bounce the flash to make your indoor photos look much better and less like deer caught in the headlights.
I never carry a big FX camera on vacation. I generally carry a D5000 with the 18-200mm lens. If I'm going to be shooting landscapes, I'll bring along an FX camera or my 10-24mm lens for DX.