Amid growing concerns about climate change and fossil fuel depletion, the global shift toward sustainable energy has become increasingly urgent. Despite significant investments in renewable energy (RE), there remains a large gap in meeting global sustainability targets. This study is the first to analyze the key factors driving RE investments, using a comprehensive panel dataset of 36 countries over 21 years (2000-2020), comparing developed and developing/emerging nations. The results show that in developed countries, factors like industrial growth, environmental taxes, social globalization, and climate vulnerability drive RE investments, while inflation and political instability hinder progress. In contrast, developing countries benefit from environmental taxes, social globalization, environmental technologies, and climate vulnerability, but industrial growth and oil prices negatively impact RE investments. These differences underscore the need for tailored strategies. Quantile-based assessments further highlight variations across countries, offering a nuanced understanding of the determinants of RE investments. This research provides valuable insights for policymakers, helping to shape more effective strategies to accelerate the transition to RE and meet sustainability goals worldwide.