Work out how much power the transistor is going to dissipate. Look at the data sheet and find out the thermal resistance between the junction and case. This will be in the form of degrees C per watt. So multiply the power and thermal resistance together. This then gives a figure of how much hotter the junction will be then the case.
Look up the maximum temperature of the junction from the data sheet, it would normally be 150 degrees C, take a lower figure, say 100 degrees. Now you know the case temperature, figure out what your maximum ambient temperature will be. Now you have to get rid of the power at the difference in temperature, between the case and ambient. This then gives you the thermal resistance of the heat sink, look in catalogues to find a suitable one.
Tj = Tr (j-c) X P + Tr (c-a {heat sink}) X P
Frank