Evergreens (conifers, anyway) are adapted for most environments, but do best where they can outcompete deciduous trees. This is particularly in zones where liquid water is a stricture in the ecosystem, so semi-arid zones, tops of mountains etc. There is also an advantage in areas with long winters, as less energy needs to be expended before photosynthesis can begin. They can grow virtually anywhere, except for the very driest deserts and the very coldest wastes, where very little will grow.
As to what makes them evergreen...they don't drop their leaves. Sounds glib, but its like asking what makes a duck a duck. They evolved that way.