The mortar is most effective against:
- enemy mortar campers (it's the only one in this list which actually gives you guarateedguaranteed kill)
- camping snipers
- camping vehicles (it's hard to hit moving ones)
- cleaning up explosives
Overall, mortar is overrated and has been nerfed by reducing rate of fire time significantly (reload time went up from 3.5s to 4.8s with 1.04 patch). Because of the increased delay you need to fire each consecutive round, if you want to say alive, you have to setup, quickly fire one shell, and move. Otherwise someone on opposing team will just counter-mortar you.
Is there any point in using it against heavy vehicles
Yes, you only need 2-3 direct hits to disable them. You rarely will get any kills though, as you can't fire consecutive rounds fast enough, so by the time you'll get next one out, it's either moved, repaired or abandoned.