The design of the heat fin system depends on the heat flux to be dissipated through the ambient and the temperature of the electronic required. The parameters to adjust are material, fin shape, fin length, number of fins, separations,...
Transistors need to be kept relatively cool or they will fail, so Class A amps always need heat dissipation. Most AB too, but Class D is so efficient, this may not be necessary at all. The size depends on how much heat needs to be dissipated. How you calculate this is anyone's guess. If you are DIY'ing, look at what commercial amps of similar design and power are using