The integration of Artificial Intelligence (AI) into agriculture is revolutionizing traditional farming practices, paving the way for a more sustainable, efficient, and food-secure future. This chapter explores the application of AI-driven predictive analytics in smart agriculture, with a specific focus on two critical areas: crop yield prediction and pest detection. We delve into the foundational concepts of machine learning and deep learning models that power these applications, examining their underlying architectures and methodologies. The chapter presents a comprehensive overview of the data requirements, preprocessing techniques, and model evaluation metrics essential for developing robust predictive systems. Through a detailed literature review, we highlight recent advancements and benchmark performances, showcasing the significant improvements AI models offer over traditional methods. Furthermore, we present a proposed methodology for both crop yield and pest detection, complete with simulated results and in-depth discussions. The results demonstrate the high accuracy and practical utility of these models, with crop yield prediction achieving an R2 score of 0.789 and pest detection reaching an accuracy of 85%. The chapter concludes by discussing the implications of these technologies for agricultural decision-making, resource optimization, and the future trajectory of intelligent farming applications.