This research offers a detailed examination of forecasting rainfall in Taiwan through the application of tree-based machine learning methods, particularly Random Forest and CatBoost models. The unique weather patterns of Taiwan, marked by frequent typhoons and monsoons, underscore the importance of precise rainfall forecasts for disaster readiness and agricultural strategy. Data for this research was sourced from Ruiyan, Taiwan, specifically from the Department of Atmospheric Sciences at Chinese Culture University, covering the period 1998-2018. The dataset encompasses five principal variables: temperature, humidity, air pressure, wind direction, and wind speed. The Random Forest model was selected for its effectiveness in managing nonlinear data, and the CatBoost model for its adeptness in handling categorical data and mitigating overfitting. Our approach included data pre-processing, adjusting model parameters, and addressing data imbalances through the undersampling technique. The evaluation of both models focused on measures like accuracy, precision, recall, F1 score, and ROC-AUC. Results show that the Random Forest model surpasses CatBoost in accuracy and AUC, reaching a maximum accuracy of 70% and an AUC of 76%. This analysis sheds light on the capabilities of these tree-based machine learning models in rainfall prediction. The study underlines the considerable promise of machine learning in improving meteorological forecasting systems, which is crucial for effectively responding to weather-related challenges in Taiwan.