Explainable AI (XAI) is important in situations where decisions have significant effects on the results to make the AI systems more reliable, transparent, and make people understand how AI systems work. In this chapter, an overview of AI, its evolution are discussed, emphasizing the need for robust policy and regulatory frameworks for responsible AI deployment. Then an overview of the key concept and use of XAI models have been discussed. This work highlights XAI's significance in sectors like healthcare, finance, transportation, retail, supply chain management, robotics, manufacturing, legal and criminal justice, etc. where AI decisions have profound human and societal impacts. Then, AI with integrated IoT for renewable energy management in the scope of smart cities is addressed. The study particularly focuses on the implementations of XAI in renewable energy solutions, specifically solar power integration, addressing the challenges and ensuring transparency, accountability, and fairness in AI-driven decisions.