Photoperiod and temperature are crucial for plant growth and development, but the accumulation patterns and regulatory mechanisms of garlic in response to these factors remain unclear. Compared to normal conditions (12/12 h light/dark; 22/15 °C day/night), increasing the photoperiod by 1 h each month with normal temperature (13/11, 14/10, 15/9, 16/8 h; light/dark; 22/15 °C day/night) or increasing photoperiod by 1 h with a 1.5 °C increase in temperature (13/11, 14/10, 15/9, 16/8 h light/dark; 23.5/16, 25/17, 26.5/18, 28/19 °C day/night) at monthly intervals substantially affects garlic growth in early G204, mid-G666, and late G390 harvest cultivars. For both increased photoperiod and temperature, the environment most favorable for bulb growth is characterized by the maximum accumulation of hormones (IAA, JA, and ZT) during bulb formation, while higher levels of ACC, phenolic acids, and organosulfur compounds are observed during the harvesting stage. Furthermore, the accumulation patterns of alliin and allicin in garlic bulbs for G204, G666, and G390 cultivars significantly increased, with fold changes of (2.0, 1.8, and 1.9) and (1.8, 1.7, and 1.5), respectively, in response to increased photoperiod and temperature conditions. Additionally, the accumulation pattern in G204, and G666 was similar but notably distinct from late harvest G390 during growth. In this study, metabolomics models were constructed to assess chemical composition variations and predict the differences among three garlic varieties during the growth stages. These models revealed functional component variations and provided reliable predictions, offering valuable insights for estimating garlic chemical compositions and identifying optimal environmental conditions for growth.