I am going to base this off of a how each class would be used in the Meta.
Scout - IF there are no other enemies or money to gather, using what ever he has will work. But, if there are enemies/money to collect, unlesss the tank is at the hatch and his DPS will save the team, he should be off killing robot snipers and spies and collecing money.
Soldier - Use your rocket launcher until a full Buff Banner, use the Buff Banner, then keep firing. Always make sure that you have 1 shot left to rocket jump to an ammo box quickly. More upgrades make it better.
Pyro - If using Phlog, then it should be pretty simple. Burn with Phlog until charged, then activate, repeat. Remember to grab ammo when needed. If you do not have Phlog, use your primary to damage tank, unless spies (good example is in Wave 666) come. Then you should go deal with them so your team can keep the max DPS out on the tank without dying to a backstab.
Demoman - Use you grenade launcher and stickybomb launcher. If the tank is first or very close to the start of the wave, the Medic can give you Kritz to all of your stickies so you can get heavy early tank damage.
Heavy - Not much to say. Just use your minigun, stay close to Buff Banner and Medic, and remember to check ammo so you do not waste time firing an empty mag.
Engineer - IF the tank is by itself, wrangle until it is within auto range, then keep giving it ammo. If there are other enemies besides the tank, do not move the sentry and let it deal with the smaller bots that could be a problem. Try to move your dispencer to a good spot the heavy and soldier could use to fire on the tank. That can give them ammo and prevent them from wasting time on trying to find a box.
Medic - IF using Kritzkrieg, use it on the Heavy or Soldier, preferably the one with more experience, ammo, and upgrades into his primary. Use your particle shield to deal consant damage to it. If you do not have Kritzkrieg and do not have particle shield, go heal one of the stronger classes who is dealing with the smaller bots. If there is no one doing that, make sure everyone else stays alive and has over heal, and revive anyone who does go down. If it truly comes down to it, use your Syringe Gun.
Sniper - IF there is a Buff Banner soldier, and you are using Bushwacka, you can go grab maxed out attack speed on it. Your DPS with it will be insane while the Buff Banner is up. If there is no Buff Banner, or you do not have Bushwacka, it depends on the enemies coming with the tank. If the tank is alone, you can attack it with anything you want, but if there are enemies, use your sniper rifle and deal with them, and/or use your Jarate to slow them down.
Spy - Use your revolver to deal damage to it, but make sure you can easily switch to killing and slowing down robots if they show up. Spy should never go after the tank if there is something else that needs to be killed.
Those are all of my ideas based on my experience playing the game, but what you do is based off of what is needed. A Buff Banner Soldier and a Bushwacka Sniper can easily deal with a tank while everyone else is back at the front lines, with maybe the Heavy going with them. You can also subsitute the Sniper with the Demo or the Heavy, and grab almost anyone else if it is needed.
In the end though, it all depends on the situation. If the tank is not out yet, send 2-3 people (with the set ups above) to deal with it, and leave the rest to kill the other robots. If the tank is near the end, use the weapon that has the most upgrades. If your Sticky Bomb Launcher is what you put your upgrades in, then use that.
Everything above is based off of my experiences with a working team with good upgrades. The amount of players needed to deal with it can change if the team skill level is low, or if the Scout has not been doing his job.