This study investigates the relationship between climate change risks, namely transition and physical risks, and their predictive effects on Environmental, Social, and Governance (ESG) stock prices. We assessed the performance of various machine learning models by analyzing daily time series data from January 2006 to July 2022. Our results indicate that incorporating climate risk variables significantly enhances the accuracy and effectiveness of these models in predicting ESG stock market prices, highlighting the crucial role of climate-related factors in financial modeling. To better understand the dependencies between the variables, we employ a novel copula-based dependence measure (qda) to quantify the deviation from independence in the dependency structure. In addition, we utilized explainable artificial intelligence (XAI) techniques such as SHAP plots to interpret the complex machine learning algorithms used in this study. These techniques reveal the significant impacts of variables, such as inflation, recession, pollution levels, and climate risk indices, on the SP 500 ESG index. From a policy perspective, our findings emphasize the need for policymakers to integrate climate change risks into stock market regulations and guidance, thereby enhancing market resilience and supporting informed decision-making among investors.