This study employs diverse machine learning models, including classic artificial neural network (ANN), hybrid ANN models, and the imperialist competitive algorithm and emotional artificial neural network (EANN), to predict crucial parameters such as fresh water production and vapor temperatures. Evaluation metrics reveal the integrated ANN-ICA model outperforms the classic ANN, achieving a remarkable 20% reduction in mean squared error (MSE). The emotional artificial neural network (EANN) demonstrates superior accuracy, attaining an impressive 99% coefficient of determination (R2) in predicting freshwater production and vapor temperatures. The comprehensive comparative analysis extends to environmental assessments, displaying the solar desalination system's compatibility with renewable energy sources. Results highlight the potential for the proposed system to conserve water resources and reduce environmental impact, with a substantial decrease in total dissolved solids (TDS) from over 6,000 ppm to below 50 ppm. The findings underscore the efficacy of machine learning models in optimizing solar-driven desalination systems, providing valuable insights into their capabilities for addressing water scarcity challenges and contributing to the global shift toward sustainable and environmentally friendly water production methods.