Waterlogging in agriculture poses severe threats to soil properties, crop yields, and farm profitability. Remote sensing data coupled with drainage systems offer solutions to monitor and manage waterlogging in agricultural systems. However, implementing agricultural projects such as drainage is associated with high uncertainty and risk, with substantial negative impacts on farm profitability if not well planned. Cost–benefit analyses can help allocate resources more effectively; however, data scarcity, high uncertainty, and risks in the agricultural sector make it difficult to use traditional approaches. Here, we combined a wide range of field and remote sensing data, unsupervised machine learning, and Bayesian probabilistic models to: (1) identify potential sites susceptible to waterlogging at the farm scale, and (2) test whether the installation of drainage systems would yield a positive benefit for the farmer. Using the K-means clustering algorithm on water and vegetation indices derived from Sentinel-2 multispectral imagery, we were able to detect potential waterlogging sites in the investigated field (elbow point = 2, silhouette coefficient = 0.46). Using a combination of the Bayesian statistical model and the A/B test, we show that the installation of a drainage system can increase farm profitability by 1.7 times per year compared to the existing farm management. The posterior effect size associated with yield, cropping area, and time (year) was 0.5, 1.5, and 1.9, respectively. Altogether, our results emphasize the importance of data-driven decision-making for agriculture project planning and resource management in the wake of smart agriculture for food security and adaptation to climate change.