Question: Mail era is gone. Now we contact either by email or phone, so why is it still necessary? 

I have read it is to let the employer know where you live, but why is it necessary? If I'm applying for a job which is far from home is because I know I will have to relocate, isn't it obvious?

Answer: 
While there is e-mail and phone as ways to contact someone, how do I know how local someone is when they apply for a job? If I have 100+ candidates that all meet my initial requirements, wouldn't it make sense to interview the local people first? If someone has to move this can cost in both money and time in some cases. The key point here is that if I have a pile of resumes, how does the company distinguish who should get an interview?

There can also be that odd personal touch for some people, like an "I went to school near there," or "Oh that's a nice neighborhood," as there can be things inferred from the address,e.g. if someone lived in Beverly Hills or Compton for a couple of parts of California that one could contrast.
My opinion you can put the town name. I wouldn't want to publish my full address to everyone who read my CV. In case the company offers you the job then you should give them your full address.