Bear in mind that Star Wars is a pseudo-techno-universe. A device does what writers want it to do, they don't try to explain it.
Heat sinks themselves would be next to useless in a space ship. Sure, they do absorb heat but they also weigh a lot and when they start to melt they're not going to do any good to the ship. They are needed to equalize the spikes in energy output and store heat energy to be dissipated later.
What a space ship (and a computer!) needs is means to get rid of exess temperature. In fact, a space ship must always pump equivalent amount of heat into space as is generated in various components, in order to avoid overheating and melting. To do that in space there's two options:
Method 1: Ejecting heated matter into space, ie. transferring heat energy by matter transfer. The most sensible way to do this would be ising fuel as heat sink and ejecting the heated fuel. This method was, and probably still is, in fact used in booster rocket engines such as Saturn 5's F1-engines: to avoid the exhaust nozzles and combustion chambers melting, they pumped the cold fuel through pipes circulating the exhaust and combustion chamber before leading it into chamber and ignited. That way the exhaust gas takes away exess heat from the actual burning process and keeps the engine intact. The fuel heatsink was also utilized by SR-71 Blackbird reconnaissance fighter.
Pros: good heat transfer power capacity for a limited time.
Cons: limited ejecta (fuel) supply equals limited useful time for the ship. Obviously it doesn't matter if the main engine is the main heat producer - you run out of fuel, you don't need the heat sink as much any more.
Method 2: Losing thermal energy via radiation, ie. radiating energy to space. Obvious advantage is that it doesn't need to eject any matter into space, so it has unlimited running time as long as fluid circulates in pipes going through the heat source and the pipes. Almost as obvious disadvangtage is that it requires a lot of surface area to get rid of substantiable amounts of thermal energy. Also there's a problem if there happens to be an external light source like, say, a star nearby that can actually pump energy into radiators - in which case a cooler becomes a
heater and doesn't really do any good...
Computers, cars and airplanes are able to use the most efficient method of cooling because there's a practically limitless heatsink - atmosphere - available for applications such as combustion engines or electrical devices. They can transfer the heat into air, then pump the air out of system and then pump back cooler air to fill the void. Water cooling uses same method but it uses water instead of air as the primary heat transfer matter - but every water cooling system has an air-cooled heat exchanger that transfers water's thermal energy into air. So it's air cooling with a twist.
In vacuum, nothing goes through the intakes so the only way they could be used for cooling in space is to be radiators, since obviously they do not spew coolant forwards. Hopefully. They are also way too small to be radiators of any significant power. So that leads me to think that they are in fact only used in atmosphere. It's possible that in atmospheric flight, craft such as X-Wing and B-Wing are able to use air as primary propellant, ie. using their engines as some sort of ramjets that take in air, superheat it and blast it out of their end. It's possible to do with sufficient energy source such as petroleoum, lasers or intense nuclear generator heat.
...Or, they are just there to look cool.