The work in banks involves interest-based transactions which is undoubtedly a sin; therefore giving the land on rent for such work helping in sin. The Holy Quran says:
وتَعَاوَنُواْ عَلَى الْبرِّ وَالتَّقْوَى وَلاَ تَعَاوَنُواْ عَلَى الإِثْمِ وَالْعُدْوَانِ (المائدة: 2)
Therefore, it is not right to give land on rent to banks. And ATM machine is probably used for withdrawing the deposited money and there is no interest-based-transaction in it, so it is allowable to give the land on rent for this machine. However, one had better avoid this too, for the rent will be paid with the interest money.
Allah (Subhana Wa Ta’ala) knows Best
Darul Uloom Deoband