This study addresses the critical challenge of optimizing rice planting schedules in Indonesia, where unpredictable rainfall threatens national and regional food security. To tackle this issue, a Bidirectional Long Short-Term Memory (BiLSTM) network is proposed to accurately predict rainfall patterns, with a specific focus on Deli Serdang Regency in North Sumatra. Utilizing a comprehensive weather dataset from 2013 to 2022 sourced from BMKG, a feature selection process was conducted to identify the 10 most influential features for rainfall. The BiLSTM model was then developed through several experimental scenarios, varying the data duration and architectural complexity. The best-performing model, achieved in a scenario using a double BiLSTM architecture and 10 years of data, yielded a Mean Absolute Error (MAE) of 11.2382 mm and a Root Mean Squared Error (RMSE) of 19.5650 mm. The resulting predictive capability provides a data-driven framework for optimizing planting schedules. Crucially, the study also reveals the limitations of current planting criteria, which can be misleading in regions prone to intense, short-duration rainfall, highlighting the need for more adaptive, region-specific guidelines. This work contributes to mitigating crop failure risks, enhancing crop resilience, and ensuring long-term regional food security.