There is a very good guide
here on bf2s.com. This is the best guide I have ever read and I have read a lot of guides.
My own tips in addition to the guide:
1) Play on servers whit many players on them(at least 40 or so, preferably 64)! The more people are on the server the easier is tanking.
2) Never capture flags! I mean: NEVER(especially on air maps)! Just aim at the spawn points and shoot them constantly from safe distance and from cover (if it is possible), and let your infantry to cap the flag. It's your infantrymen's duty to capture the flag, not yours, as a tank driver.
3) Use the tank for defending rather than attacking. Attack only if your team is in a better position than the enemy ie. your team has more flags, more vehicles than the other team.
4) Change camera views frequently!
5) Many people stress the importance of shooting while moving. I don't think it's so important. Sure, it's good if you can do that but I think there are something more usefuller. Namely: Situation awareness and using cover. In 1 vs. 1 against another tank the most important thing is being aware that an enemy tank is approaching (and what direction it is coming from) and being the first to shoot at the other tank (and hit it of course). In order to become aware that an enemy tank is coming, watch your minimap constantly, and pay attention to your teammates's spottings. After you became aware of its approach the best tactic is to use cover and shoot from long distance. Come out of cover and shoot then immediately go back to cover. Wait a sec untill reloading then repeat. If you get hit, repair while being in cover. Pop smoke before getting out for repairing!
6) Be squadleader and ask for supply box if you have found a good camping spot.
7) The best advice I can give you: Watch the minimap and never be between two enemy flags! Be sure that the flags behind you belong to your team. If one of them get captured by the enemy, drive behind it and do suppressive fire at its spawn points and vehicles until it is captured back.