Rainfall forecasting is essential because heavy and irregular rainfall creates many impacts like destruction of crops and farms. Here, the occurrence of rainfall is highly related to atmospheric parameters. Thus, a better forecasting model is essential for an early warning that can minimize risks and manage the agricultural farms in a better way. In this manuscript, Deep Neural Network (DNN) optimized with Flamingo Search Optimization Algorithm (FSOA) is proposed for Long-term and Short-term Rainfall forecasting. Here, the rainfall data is obtained from the standard dataset as Sudheerachary India Rainfall Analysis (IRA). Moreover, the Morphological filtering and Extended Empirical wavelet transformation (MFEEWT) approach is utilized for pre-processing process. Also, the deep neural network is utilized for performing rainfall prediction and classification. Additionally, the parameters of the DNN model is optimizing by Flamingo Search Optimization Algorithm. Finally, the proposed MFEEWT-DNN- FSOA approach has effectively predict the rainfall in different locations around India. The proposed model is implemented in Python tool and the performance metrics are calculated. The proposed MFEEWT-DNN- FSOA approach has achieved 25%, 26%, 25.5% high accuracy and 35.8%, 24.7%, 15.9% lower error rate for forecasting rainfall in Cannur at Kerala than the existing Map-Reduce based Exponential Smoothing Technology for rainfall prediction (MR-EST-RP), modular artificial neural networks with support vector regression for rainfall prediction (MANN-SVR-RP), and biogeography-based extreme learning machine (BBO-ELM) (BBO-ELM-RP) methods respectively.