In this study a cogeneration system producing cooling energy and fresh water was simulated and optimized. First of all, a research on the desalination techniques has been carried out to find the less energy-consuming techniques. The second step was the simulation of the desalinator unit, implementing the humidification and dehumidification technique, and his integration inside the cogeneration system. This last one includes a field of evacuated tube solar collectors, an hot storage tank which feeds a single stage LiBr–H2O absorption chiller, and the desalinator, which recovers the heat rejected from the chiller as heat source. A design simulation of the cogeneration system allowed to chose the best HD unit configuration, while a TRNSYS off-design simulation revealed the main design variables on which to focus the optimization. The optimization study on the design variables was performed by GenOpt. This study has been carried out on different objective functions and reveals that maximizing the production of cooling energy means damaging the fresh water production. A compromise solution has been chosen to balance the contrast between cooling energy and fresh water production.