Nikon L21 has a
8.0MP 1/2.3-inch (6.08 x 4.56 mm ) sized CCD sensor and features Expeed C2 processor. On the other hand, Leica M8 has a
10.0MP APS-H (27 x 18 mm ) sized CCD sensor .
One other difference between these two cameras that is worth mentioning is that Leica M8's sensor doesn't have an anti-alias (Low-Pass) filter. Removing anti-alias filter increases the sharpness and level of detail but at the same time, it increases the chance of moiré occurring in certain scenes.
Below you can see the L21 and M8 sensor size comparison.
As seen above, Leica M8 has a 17.5x Larger sensor area than Nikon L21. Larger sensors give photographer more control on the depth of field and blurry background compared to smaller sensor when shot in same focal length and aperture.