So usually the use of tanks is to shoot at other tanks or fortifications. So would a tank be useful against zombies? Would they just use it to crush the Zs?
It's the mounting platform for your flail.
WW2 Sherman Tank Mine Flail. Uploaded to Wikipedia by Balcer
You do need secure start points and endpoints for the trip. After all, you want that expensive tank (and its crew) back.
Oh, the endpoint needs a wash rack -- the gore may be quite deep by the end of a run.
You can use the approach for classic route clearance and convoy protection, or add big noisemakers on top to attract walkers for area clearance.
Flame tanks are a variation of battle tanks where either the main or secondary armament is replaced by a flamethrower. They haven't been developed much since WWII — the combat mission of tanks evolved in a different direction, emphasizing mobility and long-range firepower — but the adaptation is straightforward, and likely extremely effective against mindless ravening hordes.
All things considered, it might be more efficient to retrofit an Armored Personnel Carrier or Humvee with flame devices. The light armor of the those two is more than sufficient against zombies, and they have far better mobility and fuel efficiency. But parking a flame tank near the entry to a secure area should make that entry effectively impregnable.
Before there are more pedantic comments arguing about the exact definition of "Tank" - for the purpose of this answer I use the Merriam Webster definition of "Tank": "an enclosed heavily armed and armored combat vehicle that moves on tracks"
Tanks have armor which is impervious to zombies trying to claw at them. The are often air-tight (in case the zombie virus is transmitted by air). Their tracks enable them to free themselves even if enveloped by a huge zombie crowd which might be too much for a vehicle with wheels. So if you want to do a scouting mission in an area overrun by zombies, then a tracked tank would be the safest way to do that.
The main gun of a battle tank would be overkill against zombies, but battle tanks are usually equipped with at least one machine gun, which should be pretty efficient at neutralizing zombies. Still, if you have the luxury of being able to choose which tank to use, you might want to opt for a lighter armored personnel carrier so you don't consume as much precious fuel.
Tanks can be easily configured to attack zombies
Tanks are flexible and can serve a variety of missions. For example, the M1 Abrams, the main tank used by the US Army, can fire the M1028 Canister Cartridge:
The 120mm M1028 Canister Cartridge was developed for close-in defense of tanks against massed assaulting infantry attack and to break up infantry concentrations, between a range of 200-500 meters, by discharging large numbers of tungsten balls from the main cannon. (Source)
That sounds like an ideal anti-zombie round. Additionally, the M1 can have up to four machine guns. Imagine a massive hoard of zombies lurching toward a tank that's firing canister rounds and four machine guns.
They would (in most zombie apocalypses) not be used for offensive purposes. At best they would be used in a defensive (stationary) way.
This is because during a "typical" zombie apocalypse supply lines would grind to a halt meaning that it would be difficult to keep a steady fuel supply. And tanks use a lot of fuel. A tank like the M1 Abrams gets about 0.6 miles per gallon. A Humvee (a faster vehicle that is also armed and armored and easily able to charge through a crowd of zombies) can get 12 miles per gallon meaning you can have 20 Humvees operational for each tank you leave behind.
So best use for tanks would be simply to become part of a barricade and use the machine gun (perhaps the main gun) on top. And if the barricade get's overrun they could always hide inside the tank and wait for rescue or if there is some fuel left ball back to reestablish a new line.
They wouldn't, because of fuel consumption and maintenance
You don't have to agree with everything Max Brooks wrote, but if you're talking zombies then you need a compelling reason to go down a different path.
Your biggest problem when you're facing zombies is not the zombies directly in front of you, it's the zombies over the entire rest of the country. Someone needs to make your army's supplies, and more people need to transport those supplies to your army. As Napoleon found out in Russia, if you can't supply your army then your army can't fight.
Brook's US military, dramatically on the back foot and desperately evolving effective tactics, came up with the concept of "kills per resource expended". (I think that's the right phrase.) Any weapons system was assessed based on how many extra zombies it could take out for the cost in resources to produce it. Aircraft and vehicles were assessed as only being resource-effective for transport of people and equipment.
Sure, a tank can plough through zombies, so long as it's got fuel and it's well-maintained. But the M1 Abrams only gets 0.6mpg, and an armoured division needs 600,000 gallons of fuel a day. And you might only get 1000km before you need to change the tracks, which you would certainly do inside a week of constant action. When your factories and fuel refineries are mostly out of action because of zombie infestations nationwide, you need to radically conserve your resources. Is it better to use that fuel and steel for a tank for a day, or is it better to use that fuel to transport a thousand extra troops and food to sustain the attack for a month, and use that steel to equip them all with anti-claw mesh armour and battle-axes?
Some of the first tanks deployed in anger were fundamentally designed to overrun entrenched infantry positions. While modern tanks are less directly designed for this purpose, they're likely more effective at it.
Also one of the safest places you could possibly be during a zombie invasion is inside an armoured vehicle of some kind, even if all you're doing is sitting it out. While you're likely to use lighter armoured vehicles for getting about the place, any armour being good enough to keep zombies out, there's certainly a use for tanks in the larger equation.
While the general idea of a tank is as a mobile platform for fighting other tanks - there's also several advantages to a modern tank or AFV.
One can't break a window, or swarm a tank as easily, and a swarmed tank can button up and wait for assistance.
I'd prefer a smaller AFV or IFV to a MBT - but generally you have a vehicle that's designed for rough/unimproved terrain, against an enemy who cannot effectively use anti tank weaponry or penetrate even the weakest of tank armours.
If we're talking main battle tanks, they're an odd choice. You might be able to outfit them with specific improvements for more effective zombie killing. Military vehicles do often have modifications to specific threats, like anti RPG slat armour. You might have electrified outsides for zombie zapping, spikes to make climbing up a tank dangerous, or even the use of claymores as a form of reactive armour
Effective use of an MBT might be as a 'mobile' pillbox or command unit. Move em somewhere you expect a zombie presence, lager them, with defences like concertina wire, and use their night vision equipment, height and superior firepower to clear the nearby area. You might also use lighter screening elements to herd the zombies into the most efficient fields of fire. Essentially tanks form a great core for a temporary base, as well as local firesupport.
That said, even the 75mm pop guns on the AMX 13 are hardly the right tool for the job. While anything you hit has had all its days ruined, its overkill, and you really are not going to carry more than 20-30 rounds. Tank guns are best used for effect, possibly with specific ammunition types.
Your 7.62mm or .50 cal co-axial guns might be a better option (even more so than conventional infantry 5.56mm rounds), since you don't really want to wound zombies as much as blow off meaty chunks.
The classic M113, while having armour marginally more useful than cardboard, with a remote weapons platform might be a perfect pillbox. Drive it over, use the .50 caliber to chew up those zombies, and scoot away to rearm, refuel and rest.
Personally, perhaps in a fit of national pride, I'd prefer something like the bionix 2 You have a lovely turret with a 30mm cannon, cause nothing says "goodnight" like a 30mm round (the same calibre as the famous GAU-8 Avenger of thunderbolt fame uses). You have two (three? I can't remember) additional 7.62 guns for lovely fields of fire
Even the adorable little weasel is going to get you much more efficient throw weight than a hummer.
If you want something with a little more flexibility, and want to not rip up the streets, a MRAP type vehicle would give you a lot of the same firepower advantages, though aren't really designed with the same sort of throw weight.
I don't really think there's any real contemporary literature on the use of indirect fire from mortars or artillery but depending on the density of the zombies, and available fields of fire these might also compliment an armoured lager/firebase well. You can carry, transport, or use armoured units that are capable of fire support for this. I'll leave the implications of responsible use of artillery and anti zombie landmines to be considered by the reader
Because there are no better options
Of all terrestrial vehicles, tanks are the most zombie-resistant. Their weight and off-road capabilities make them almost entirely impervious to zombie attacks. Zombies will have to make a pile of bodies big enough to have any hope of stopping a tank. So, whenever the military needs to get from point A to point B, and air transport is not an option, tanks become the primary choice.
And this is not to mention very broad offensive capabilities of tanks listed in other answers.
Tanks are just lawn mowers for zombies
No number of zombies can take out a tank. A tank weights around 60 tons and not enough zombies can get close enough to flip it or even damage it, not even World War Z zombies.
They're loud and attract the zombies to you making clearing an area faster and safer.
The only real addition you need is a drone above you or a spotter so you can see if you get covered in zombies.
If the worse happens, you turn the tank off and wait for them to leave. They can't get you inside.
It's a safe way to exterminate zombies.
It seems the questioner is getting at a good point, which is that tanks are usually employed to achieve strategic objectives in a manner different from infantrymen or other tools in your arsenal. The main gun on a tank doesn't seem likely to be very effective at destroying hordes of zombies approaching from all directions, but the tank's ability to maneuver over hordes and its impenetrability seem like huge advantages. The tank's main assault weapon would be, in this case, a machine gun or some unconventional weapon like a flame thrower or the chain apparatus already mentioned. Their other utility would be as a scouting instrument, though perhaps LAVs might be more effective here.
The tank would likely be deployed in tandem with infantrymen performing house clearing operations. This is because the tanks can provide high firepower and protection for the infantrymen while the infantryman can clear a city or other region zone by zone. This is similar to how the Marines operated in the second battle of Fallujah. I should point out that armored personnel carriers would be an invaluable asset in this mode of combat, allowing the infantrymen a means to deploy and maneuver quickly. This type of maneuver would be more difficult if only tanks (combined with infantrymen) were used.
The more interesting point this question is getting at is "what does victory mean in such a war?" War is typically defined as the use of violence or the credible threat of violence to achieve political ends. Tanks are effective tools in this front because their armor and awesome firepower allow for the destruction or capture of strategic objectives. This, along with their intimidation factor, allows for the accomplishment of strategic goals. These types of goals would ostensibly be irrelevant against the type of enemy you're considering.
If you're considering such a military scenario, you should read "We Were One" by Patrick O'Donnell. This is an account of the battle in Fallujah, where combined arms were used to clear zones block by block as I imagine you are considering. If you're including military strategy in general the manual everyone should read is "Warfighting", a USMC publication which is the standard reference for militaries the world over for how to conduct war.
simply put you put yourself into a good bit of mobile armor that can defend against physical and aerosol attacks that also allows Crowd-Control capabilities without being exposed. Coaxial machineguns, front mounted machine guns, or even just canister shot. Heck even white phosphorous will do lots of damage to unarmored and unprotected crowds of the already half-rotten corpses. if you run out of munitions, you have a good engine to take you away or to go on a ramming spree (although the latter is ill advised due to possibility of damage to the tracks; might injure your possibility of getting away. But the tank is only as good as its team; you will need repair teams to help keep the combat team most efficient.