Using first principles density functional calculations, we study the electronic structure of the low-dimensional multiferroic compound FeTe2O5Br to investigate the origin of the magnetoelectric (ME) effect and the role of Te ions in this system. We find that without magnetism even in the presence of Te-5s lone pairs, the system remains centrosymmetric due to the antipolar orientation of the lone pairs. Our study shows that the exchange striction within the Fe tetramers as well as between them is responsible for the ME effect in FeTe2O5Br. We also find that the Te^4+ ions play an important role in the inter-tetramer exchange striction as well as contribute to the electric polarization in FeTe2O5Br, once the polarization is triggered by the magnetic ordering.