When a stack attacks or defends against another stack, it calculates the potential damage based on the armor class of the units it is facing, and then uses the 10 units from the stack with the greatest amount of damage against that armor class (factoring in terrain bonuses) to inflict the damage. The other units will not contribute. That means that if you have a stack of, say, 20 light tanks, it will do much more damage to split the stack in 2. If you have a stack of 20, 10 light tanks, 5 infantry and 5 anti-air, then splitting them will not double your damage, it would simply give you a stack of 5 infantry and 5 anti-air, which are primarily defensive, and this would leave the light tanks vulnerable to an air attack. So, it does not make sense to stack more than 10 of a single unit type in a stack, but it can, under some circumstances (not all circumstances) make sense to have a stack of mixed units that adds up to more than 10 units, depending on the kind of threats you are facing.
See the Wiki for more info on this.