A presentation about the environmental costs of oil production (by Dr. Dumelin, here - direct download!) reveals that coconut oil performs worse than palm oil in some commonly assessed impact categories (namely energy requirement, global warming potential and land use) while it performs better in others (namely acidification and eutrophication impact):

PO = palmoil, CN = coconut oil; for these two oils data originates from Malaysian farms
Importance of the product stages.
In a separate report by the same author it is revealed that the agriculture and processing stage, rather than transport, contribute most to the total environmental burden of palm and coconut oil in nearly all impact categories (with the exception of photochemical smog). (Dumelin 2009)
Why have both oils comparatively small impacts?
"[The] very high yields per hectare that are obtained from palm plantations" (Dumelin 2009) are the reason why this oil performs so well overall. Compared to other oils also "coconut oil has very low impacts because very low levels of pesticides are used and most farm operations are carried out by hand so very little fuel is consumed" (Dumelin 2009).
A note about life cycle assessments.
Please be aware that the selection of impact categories is up to the author of a life cycle study (as is also pointed out in the presentation)! That means that some impact categories with a surprisingly high contribution may have been (accidentally) excluded from analysis. It is further subjective on how much value is assigned to each category and if, for example, the clearance of rain forest is rated to be more harmful than the clearance of temperate forest (as THelper mentioned). This problem however is valid for all life cycle assessments. The most commonly analysed impact categories (global warming, energy requirements, acidification and eutrophication impact and land use) are presented in this study, so it seems fairly reliable.
In short, the production of palm oil seems to require less energy, emits less greenhouse gases and uses less space than the production of coconut oil. However, more substances are emitted that contribute to acidification and eutrophication.
Reference
Dumelin E 2009: The Environmental Impact of
Palm Oil and Other Vegetable
Oils** (** Reproduced from the paper presented at
the SCI (Society of Chemical Industry)
Conference on ‘Palm Oil–the Sustainable
21st Century Oil - Food, Fuel & Chemicals’
at London, 23-24 March 2009.)
destruction of ecology
do you mean? Building plantations or pure harvesting does the harm?