Climate change poses a major threat to global food security. Agricultural systems that rely on monsoon rainfall are especially vulnerable to changes in climate variability. This paper uses machine learning to deepen understanding of how monsoon variability impacts agricultural productivity. We demonstrate that random forest modelling is effective in representing rice production variability in response to monsoon weather variability. Our random forest modelling found monsoon weather predictors explain similar levels of detrended anomaly variation in both rice yield (33%) and area harvested (35%). The role of weather in explaining harvested rice area highlights that production area changes are an important pathway through which weather extremes impact agricultural productivity, which may exacerbate losses that occur through changes in per-area yields. We find that downwelling shortwave radiation flux is the most important weather variable in explaining variation in yield anomalies, with proportion of area under irrigation being the most important predictor overall. Machine learning modelling is capable of representing crop-climate variability in monsoonal agriculture and reveals additional information compared to traditional parametric models. For example, non-linear yield and area responses of irrigation, monsoon onset and season length all match biophysical expectations. Overall, we find that random forest modelling can reveal complex non-linearities and interactions between climate and rice production variability.