Metabolic disease in children is increasing worldwide and predisposes a wide array of chronic comorbid conditions with severe impacts on quality of life. Tools for early detection are needed to promptly intervene to prevent or slow the development of these long-term complications. No clinically available tools are currently in widespread use that can predict the onset of metabolic diseases in pediatric patients. Here, we use interpretable deep learning, leveraging longitudinal clinical measurements, demographical data, and diagnosis codes from electronic health record data from a large integrated health system to predict the onset of prediabetes, type 2 diabetes (T2D), and metabolic syndrome in pediatric cohorts. The cohort included 49517 children with overweight or obesity aged 2-18 (54.9% male, 73% Caucasian), with a median follow-up time of 7.5 years and mean body mass index (BMI) percentile of 88.6%. Our model demonstrated area under receiver operating characteristic curve (AUC) accuracies up to 0.87, 0.79, and 0.79 for predicting T2D, metabolic syndrome, and prediabetes, respectively. Whereas most risk calculators use only recently available data, incorporating longitudinal data improved AUCs by 13.04%, 11.48%, and 11.67% for T2D, syndrome, and prediabetes, respectively, versus models using the most recent BMI (P < 2.2 × 10-16). Despite most risk calculators using only the most recent data, incorporating longitudinal data improved the model accuracies because utilizing trajectories provides a more comprehensive characterization of the patient's health history. Our interpretable model indicated that BMI trajectories were consistently identified as one of the most influential features for prediction, highlighting the advantages of incorporating longitudinal data when available.