The efficiency of solar panels decreases gradually with the increase of solar cell temperature. To face the problem various researches have been carried out. This paper studies the effect of using a cooling system on the useful energy and the overall efficiency of a PV panel. Firstly, a numerical study has been carried out to reduce the temperature of photovoltaic panels by using cooling fluids. To achieve our goal, a modeling of the heat flows between the panel components and the cooling fluid was performed, then a Matlab simulation to optimize the efficiency of the PV panel was run. A heat exchanger consisting of rectangular pipes was chosen to ensure a maximum heat exchange surface with the fluid. The choice of operating conditions and geometrical parameters was made according to the cell temperature, which must be minimal. The metrological conditions are collected from the meteocentral corresponding to the region of Gabes located in southern Tunisia. To further enhance the performance of solar collectors, different cooling fluids were tested including nanofluids. After testing the thermal behavior of different fluids, MgO was chosen as the best operating nanofluid. Using this nanofluid, the overall power increased by 400W.m−2 compared to that obtained with water. In addition, the electrical energy of the panels increased by 12.17% compared to water.