It's pretty much been covered, but to summarise (I've just sold a 400D for a 40D):
- The 40D is heavier and handles much better (esp with battery grip) in my opinion
- The digi display on the top is a godsend
- The control layout is infinitely better and I've managed to change settings quick enough to catch shots where the 400D would have lost them
- The LCD is bigger, brighter, and has a much better colour to it
- LOADS more menu features and custom option to setup quick change settings
- Flash sync cable port
- Spot metering
- Better sensor which makes a big difference to noise handling. Shooting up to ISO400 introduces very little noise
- Liveview which is great for macro/still life shooting
If you want better IQ, buy an L lens. If you want better handling, buy the 40D.