Mushroom cultivation is getting increasingly popular within Sri Lanka’s agricultural sector due to its cost-effectiveness, high yield potential, and rising market demand. Nevertheless, the manual farming practices commonly employed in button mushroom cultivation often result in inefficiencies in production and product defects. This research focuses on leveraging machine learning techniques to optimize various aspects of button mushroom farming, encompassing casing quality assessment, early disease detection based on environmental parameters, and harvest forecasting. The study employs a systematic methodology to evaluate casing quality, explore the connection between environmental variables and disease onset, and establish predictive models to enhance harvest outcomes. To evaluate casing quality, the performance of five machine learning classifiers were evaluated, with the decision tree algorithm achieving the highest casing quality assessment accuracy of 97.02%. For early detection of diseases, support vector machine (SVM) attained a remarkable accuracy of 98.06% driven by environmental parameter analysis, Additionally, harvest prediction is effectively executed through a decision tree regression model with an 88% accuracy rate. The outcomes of the research offer valuable insights for mushroom cultivators to refine their cultivation methods, minimize losses, and bolster overall efficiency and profitability.