Generally speaking the answer is yes, but sometimes it is no. Most fish ectothermes meaning their core body temperature is normally close to that of their environment. However this does not mean that they are completely complacent about body temperature. By choosing a particular environment a fish can gain some control over it body temperature. Furthermore some sharks, and some fish such as Tuna possess biological mechanisms that enable them to maintain parts of their body at a temperature greater than that of the environment.
Is body temperature important? The answer is often yes. Everything that happens in the body of a fish or a person is the result of chemical reactions, and within certain limits chemical reactions work faster the more energy they have and warmth is energy. So a warm body means that your metabolism works more quickly, food is digested faster, growth is quicker, muscles respond more quickly and with greater strength, brains think faster etc. However there is also a cost, warmth is energy, it has to come from somewhere, and that somewhere is our food. To maintain a body at a temperature above that of the ambient, above that of the surrounding environment we burn food, and the greater the difference between the ambient temperature and our body temperature the more food we have to burn. So to have a more effectively functioning brain and muscles we need to keep them warm, but to do this we need to eat more food, and preferably to eat high energy food, and obviously before we can eat the food it has to be found and captured. So it is a trade off, birds and mammals go for maintaining a higher body temperature and paying a higher cost, reptiles and amphibians choose ectothermy as do most, but not all fish.
Behavioral thermoregulation occurs when a fish actively seeks out areas of water with higher or lower temperature. For instance juveniles of the Bear Lake Sculpin (Cottus extensus) live at the bottom of lakes feeding on the lake floor during the day. Here the temperature is normally around 5°C, however after dark they stop feeding and rise to he surface where they hang around digesting their food. The temperature near the surface of the lake is about 14°C. By doing this they are able to digest much more food during the night than they could have done by staying on the lake bottom and so they can grow more quickly. The difference is considerable, at 5°C it would take them 33 hours, or a day and a half to digest the food they can eat in one day, but at 14°C it takes them only 4.5 hours to digest the same amount of food, so by coming to the surface at night they are making much more efficient use of their time. And then by returning to the colder water as soon as its food is digested it slows down its metabolism again and thus conserves energy.
Sometimes the strategies that evolve in simple living creatures are truly amazing and almost seem to reflect intelligence. Another example of behavioural thermoregulation is the Sockeye Salmon (Oncorhynchus nerka). Sockeye Salmon are crepuscular feeders, meaning they hunt for food, and therefore feed only at dawn and dusk. During the full day and the full night they rest. Scientists have learned that in Canada, in Summer, when the days are long and the nights are short that the salmon adjust their behaviour to maximize their efficiency. After feeding at dusk the salmon rest throughout the night at depths of around 11 metres where the temperature is about 15°C, however after their dawn feeding they retreat to depths of about 37 metres where the temperature is only about 5°C. Why? Because the night is short they need to be warm to digest all they have eaten before the next feeding session, but because the days are long they have more time and so can digest their food fully at a lower temperature, and in doing so they reduce their metabolic costs.
Behavioural thermoregulation is not uncommon in fish, or in reptiles, amphibians and insects. It is easy to implement and has the advantage of not being permanent, meaning the animal can, in the best environmental circumstances choose to be warm or cool as it needs. However it has the problem that the environment is not always at its best, and even when it is it takes time to warm up enough to allow quick muscular action. Animals that practice physiological thermoregulation have the edge when the ambient temperature is not optimum, which even in the sea is quite often.
Physiological thermoregulation is where the fish controls its core body temperature by means of internal physiological and metabolic activities. This is also how we maintain our body temperatures, but while it is universal among mammals it is rare in fish. It occurs in only a few species, all of which are marine and swim constantly. These include various Tuna, some Mackerels, the Mackerel Sharks (Lamna nasus and L. ditropis) and the Great White Shark (Carcharodon carcharias).
Both sharks and bony fish that maintain an increased body temperature do so by means of a counter-current exchange system whereby blood vessels carrying blood that is hot as a result of muscular activity pass along side, and give up some of their heat to, blood that is going to parts of the body the animal wishes to keep warm. The organ where the heat exchange takes place is called retia mirabilia. A fish may have more than one retia mirabilia, Mackeral Sharks for instance have three, one in the swimming muscles, one in the body cavity near the guts and one around the brain.
As with any other successful adaptation there are many other minor changes that work along side the major one in harmonizing the animals metabolism. For example Albicore Tuna have evolved a unique form of haemoglobin that increases its affinity for O2 as it gets warmer while its CO2 affinity increases as it gets cooler. This is the reverse of the normal situation, but it does prevent O2 from being lost from the warming arterial to the cooling renal blood in the retia mirabilia.
The next step up from recycling the heat from muscular effort to heat parts of the body, which obviously only works while the animal is using it muscles (which is why all the species that do so are constant swimmers), is to use purely metabolic processes to generate heat. The only example I know of in the fish is the Swordfish (Xiphia gladius). Swordfish have specifically modified eye muscles with an exceptionally high mitochondrial volume. Mitochondria are the organelles wherein food is turned into energy, they are found in every cell of your body. The swordfish does not use these special eye muscles for anything except normal eye movements (which does not generate much heat) and to heat the blood going to its brain. In other words the mitochondria work purely to make heat for the purpose of keeping the precious brain warm, it is not merely recycling heat that was a byproduct of normal muscular activity as are the sharks and the tuna. This is much closer to the mechanisms used by birds and mammals to maintain their body temperatures. Evolution takes a long time in comparison with a short life spans, but who can say what fish will be swimming in the sea and oceans in another 50 million years.
Remember, as I said above chemical reactions occur more quickly at warmer temperatures, warmer guts digest food more quickly, a warmer heart beats more strongly, warmer muscles contract more strongly and respond more quickly and warmer brains work better. The contraction power of the muscles of Bonito (Sarda chiliensis lineolata) doubles with a 10°C increase in temperature. All this can give a predator and advantage that makes the difference between life and death. All the fish and sharks that maintain a raised body temperature are active constant hunters. The tuna and mackerels hunt smaller fish and the sharks hunt the tuna and mackerel amongst other things. Endothermic animals need to eat a lot more than ectothermic ones, sometimes as much as 3 or 4 times as much.