Coffee is often regarded as one of the more environmentally friendly forms of agriculture, since the plants benefit from growing in woodland conditions and are therefore often grown in mixed-species plantings (often marketed as shade-grown coffee), and they don't typically require much intensive or invasive management (such as repeatedly tilling the soil).
I was lucky enough to see a number of these coffee farms firsthand when I did study abroad in Costa Rica as an undergrad ecology student. I was very impressed with them and the amount of biodiversity they hosted. They were certainly much, much better than nearly all of the agricultural alternatives I saw (especially banana farms, which exhibited by far the worst agricultural practices I have ever witnessed — and most of my career experience is in agricultural research, so I've seen a fair few).