Agriculture is the backbone of many economies and plays a critical role in global food security. However, with growing challenges posed by climate change, erratic weather patterns, and soil degradation, the need for precise and predictive techniques in agriculture has never been more urgent. This paper focuses on the application of machine learning (ML) techniques in soil fertility prediction and weather forecasting, two critical components that can significantly impact agricultural productivity. By analysing soil properties, such as moisture, pH, and nutrient levels, and combining them with accurate weather predictions, our system aims to help farmers make informed decisions regarding crop selection, irrigation scheduling, and pest control. Leveraging algorithms like Naive Bayes for soil classification and Long Short-Term Memory (LSTM) networks for weather prediction, we provide a comprehensive solution for precision agriculture. This system not only enhances productivity but also promotes sustainable agricultural practices by optimizing resource use and reducing wastage