D40 has 6mp, D60 has 10mp.
Generally, the less pixels per square micrometer the better nowadays - the sensor is usually more sensitive in low light. ; However, the D40 and the D60 have the same sensor technology, so the D40 isn't a low light queen - the next generation sensor does that.
For some reason, the D40 is the undisputed King of Flash Sync. ; Without using a special flash, the D40 can take flash pictures up to 1/500 sec. ; All other dSLRs max out at 1/250 or 1/320 second - without using high speed flash, which you need one of the larger external flashes to use.
Other than that, they are the same size, weight, etc.
Both the D40 and D60 have been replaced. ; The D40 is probably a stronger camera than its' replacement - the D3000; while the D5000 is stronger than the D60.