These are commonly used as immersion coolants in power engineering - transformers, switchgear and such things. For that purpose they work very well. They are useable for cooling electronics too, but subject to a few drawbacks.
Hydrocarbon oils have many advantages. They are cheap, insulating, dielectric, and retain that dielectric and insulating ability even under slight contamination. They don't react with metals or most materials. They work. The most commonly used immersion coolant for computers is mineral oil - a vaguely-defined hydrocarbon oil. There's no standard as to exactly what goes into mineral oil, so different brands and even different batches will vary in composition. The engine oil used in automotive applications is another readily available hydrocarbon oil, though high viscosity can be a drawback.
There is a catch, though. Hydrocarbons do react with some plastics, slowly degrading them over time or leeching out plasticiser to turn the material brittle and cracked. They are particually prone to slowly destroying electrolytic capacitors. Hydrocarbon immersion may work perfectly at first, but after a few weeks or months of running the hardware will fail due to capacitor damage. Leeched insulation can also lead to shorting, which is a Very Bad Thing given another property of hydrocarbon oils: They are highly flamable.
Some hydrocarbon oils are available forumulated specifically for cooling power eletronics. These are less viscous and less reactive than others. Better, but still not ideal.
Silicone oils are a good alternative. They retain all the advantages of hydrocarbon oils, but are chemically near-inert. They don't degrade plastic. I am unsure of their effect on capacitors, but I would expect them to be significently less damaging - there may be issues with silicone being absorbed into some brands and causing swelling of the lower structure section. Though they can burn, they do so less readily than hydrocarbon oil. Though a little more expensive, they are well within the range of affordability. Thermal conductivity is a little lower than is typical for a mineral oil. They can also be quite thick, so make sure to buy a low-viscosity oil and you may need a pump to ensure circulation.
Perfluorocarbon
This is the ideal immersion coolent. It barely reacts with anything at all. Low viscosity. Great wetting property. Non-flamable. All countered by a single serious drawback: Price. In the hundreds of pounds per liter for Fluorinert, the 'gold standard' coolant made famous by use in the Cray-2 supercomputer. The high price has limited it to exotic applications like compact power engineering on warships, high-density supercomputing and overclock record-setting attempts.