The 2010 earthquake in Haiti had a magnitude 7 compared to Japan's 8.9 magnitude earthquake, which released more than 1000 times the energy than what occurred in Haiti. However, more than 200,000 people were killed in Haiti compared to the greater than 10,000 in Japan just recently, as a result of the earthquake. The reason why so many were killed in Haiti was because Japan was prepared. Japan is one of the most earthquake prepared countries, while Haiti was far from being prepared.
Haiti 2010 earthquake. Source: Google Images
Japan 2011 earthquake. Source: Kyodo/Reuters
Japan invests research into understanding the processes of earthquakes and creates infrastructure that is better to withstand effects. You can see in the above two pictures that most of Japan's buildings are still standing, compared to the infrastructure in Haiti, where the buildings are collapsed or soon will be.
They also have an adequate warning system in place. Seismic networks that record waves in the earth, provide a tsunami warning system and an earthquake warning system that can gives tens of seconds warning.
Haiti, however does not have the money that Japan does to invest in earthquake prevention. Unfortunately, Haiti has virtually no building codes. The primary cause of deaths as a result of the earthquake in Haiti was the collapse of buildings that where not built to survive a strong earthquake.