Astronomy is entering a new era driven by artificial intelligence (AI), enabling efficient analysis of large and complex datasets beyond traditional methods. In studies of star formation and the interstellar medium, AI provides tools to extract physical insights and link simulations with observations. This proceeding highlights two complementary directions under AI4Astro. First, discriminative AI identifies and characterizes stellar feedback and protostellar outflows, leveraging 3D models trained on synthetic data to recover structural and statistical properties. Second, generative AI infers intrinsic physical quantities of molecular clouds, including gas density, magnetic fields, and interstellar radiation fields, from limited observables. Diffusion-based models, particularly the Diffusion Schrödinger Bridge (DSB) framework, enable interpretable, physics-aware inference and improve robustness on out-of-distribution cases. These studies illustrate the transformative potential of AI in advancing our understanding of star formation and ISM dynamics, while opening new directions for integrating discriminative and generative approaches in astrophysical discovery.