I guess diesel engines don't use spark plugs because the air/fuel mixture isn't as explosive as is in the case of petrol (or gasoline). Therefore you cannot spark ignite it. That is the reason why diesel engines have a high compression ratio (close to 20 as has been said), which heats up the air being compressed in the cylinder to a high enough temperature. Fuel is then injected straight into the cylinder, where it ignites because of the high temperature of the air and that is it. That's why spark plugs are not needed.
The thing is, in petrol engines you used to squirt the fuel into the air intakes, where it mixed with the incoming air and filled the cylinders. If you used compression ratios as high as diesels, you would get premature explosions, i.e. knocking. That's why the ratios are lower and that's why you need a spark plug to ignite it.
Directly comparing the two engines at the same compression ratio, gasoline engines are more efficient (at least at ratios of around 10 to 15). It would be possible to make a gasoline engine with a ratio of 15 these days, since we have mastered direct injection in petrol engines as well, but that would stress the heads (and pistons) a whole lot more - petrol mixture burns at ~1200°C, while diesel does at ~800°C - a big difference. Plus the pressures would be very high, etc. It is possible in theory, but is not practical (emissions would be a b*tch as well, i think higher cylinder temps cause more NOx to form in the exhaust gases).
EDIT: that's how i see it, but i could be wrong. Correct me if i am.