Farming and development has lead to vast areas of natural forest being burned, chopped down, or otherwise destroyed. Because the soil is not ideal for crops (but rather for sustaining trees etc...), farmers are often successful only for a few years, after which time, farmers need to move on and destroy another area for their produce.
As time progresses, farmers are not only destroying more areas in their quest for fertile soil, they are also increasing in number. Similarly, the demand for development and expansion has also sky-rocketed as the population explodes. Another reason for the destruction of rain forests is the increasing need for timber. All of this adds up to more space required at the expense of the natural rain forests.
The lack of viable forest areas means less oxygen production and massive soil erosion (as tree roots play a major part n anchoring soil). Elephants need vast areas of fertile land and forests in which to graze. As they tear and push down trees, they now begin to exacerbate the man-made problem as there are insufficient resources.
In third-world continents, such as Africa and Asia (where elephants are common), overgrazing is a growing epidemic. Grazing livestock has completely destroyed the land and its nutrients, rendering it completely barren. As this problem spreads over increased farming areas, the space available to wildlife decreases exponentially. With elephants requiring as much vegetation as they do, these areas are completely useless to them.
As is the nature with the human race, hunting has been carried out in absolute excess. Elephants themselves are hunted for their ivory and hides. Overhunting is considerably easier in the case of an elephant because its lifespan is longer and they take many years to reach maturity. This means that the population is not able to regenerate as quickly or as easily as species that reach maturity faster and produce more offspring more regularly.
As other animals are killed at an alarming rate, the effects ripple up the food chain and affect all of the links in that chain. Ironically, it also has major repercussions on man, who perch at the top of that chain. However, these repercussions are yet to prevent humans from their relentless destruction.
Here is more on Elephant Habitat Loss