Tank guns typically fire 3 types of projectiles. Each is affected differently by rifled v.s. smoothbore barrels, and the choice of which barrel type to use is a trade-off based on what the gun designer/military user sees as most important. The 3 projectile types are:
**APFSDS (Armour Piercing Fin Stabilised Discarding Sabot ** - This type of projectile is a long thin rod of metal with small fins at the end, inserted into a sabot which is the same diameter as the inside of the gun barrel. When fired, the propusion charge pushes against the base of the sabot and propels the projectile out of the gun, where the sabot falls off, leaving the center penetrator rod to continue on and hit the target. This is the projectile generally used against other tanks. It does not explode (although the target might!).
This type of projectile is most accurate when it doesn’t spin, so can easily be used in a smoothbore. If fired from a rifled gun, the sabot needs to have some sort of ball bearing collar or other mechanism added to allow it to spin while preventing the penetrator rod from spinning, making it more complex and expensive. (You may lose some accuracy at long ranges anyway, as it is difficult to prevent some spin. OTOH the spin ensures that the sabot is less likely to separate unevenly and defelect the penetrator rod, which is sometimes a problem with non-spinning sabots.)
Deleted uranium is used by the US in current M1 APFSDS projectiles as it is dense, stiff, and can get hot enough to ignite due to friction when penetrating the target armour, all desireable features.
HEAT (High Explosive Anti-Tank) and HEP/HESH - There is a trade-off with this projectile, as it is more accurate when fired from a rifled gun but more effective when it hits if fired from a smoothbore. It needs a non-spin collar or other mechanism similar to APFSDS sabots if you want to get the best effect on the target after firing it from a rifled gun. HEAT is the projectile generally used against APCs and other lightly armoured vehicles (APFSDS is too powerful for these targets, and can go right through and out the other side with little damage in some cases). As explained by Paul in Saudi, these explode, but in a very controlled fashion.
HE (High Explosive - This is the basic “exploding” shell used by artillery, WW2 tanks, and Hollywood. It is most accurate when fired from a rifled gun and is much less accurate when fired from an unrifled gun. HE is used against infantry, buildings, etc.
If you expect your tank to be mostly shooting at enemy tanks using APFSDS, with other targets handled by other weapons (such as artillery), then a smoothbore gun is a good choice, as it is cheaper to manufacture, doesn’t wear out as fast, and is easier to clean and maintain.
If you expect your tank to need to do a significant amount of shooting at things other than tanks, a rifled gun is a good choice, as it provides greater accuracy with a range of different projectiles, at the cost of some extra complexity and expense.