The spread of these two deadly diseases is done by mosquito. Malaria was spread by the Anopheles mosquito and yellow fever was spread by the Aedes aegypti mosquito. Mosquitoes would ingest blood from one human who was a carrier of the disease and pass the virus to another human. The presence of mosquitos to transmit the diseases, combined with a reservoir of infected humans, assured that people in these areas would be exposed to the diseases.
While the Africans were genetically protected the Europeans were not. Many Europeans living in the new lands would contract the diseases and die. The resistance of Africans to these diseases, which allowed them to survive and work in infested areas where Europeans couldn't, ironically increased their usefulness there and caused increased slave trade. The introduction of these two diseases into the Caribbean changed the ethnic make up of the area.