Magnesium (Mg), as an essential and central mineral element for chlorophyll biosynthesis, plays a crucial role in plant photosynthesis. Magnesium deficiency inevitably affects the photosynthetic ability of leaves, thereby impairing the yield and quality of crops. However, few studies have revealed the intrinsic mechanisms by which Mg deficiency hinders growth and photosynthesis, particularly by analyzing the processes of light capture, dissipation, absorption, and utilization in tomato. The experiment studied the effects of Mg deficiency on internal structure of leaves, light absorption, electron transfer, photophosphorylation, and carbon assimilation, combined with transcriptome data analyses and key gene screening in tomato leaves. The results showed that Mg deficiency induced obvious leaf chlorosis and damaged stomatal structure, irregular chloroplast structure and degraded thylakoid lamellae, thereby resulting in lower chlorophyll content, net photosynthetic rate, water use efficiency, and biomass. Decreased expression of 11 genes related to light-harvesting antenna proteins suggested that Mg deficiency weakened the light absorption capacity of tomato leaves, Additionally, Mg deficiency inactivated the photochemical reaction centers of photosystem I (PSI) and photosystem II (PSII), and decreased the expression of related genes (PSAA, PSAB, PSBA, and PSBB), leading to a reduction in electron transfer capacity from the donor side of PSII to PSI. Furthermore, Mg deficiency inhibited ATP synthesis and weakened carbohydrate assimilation by reducing carboxylation capacity of the Rubisco enzyme, Rubisco carboxylation rate (Vmax), and triose phosphate transport rate (TPU). The accumulation of carbohydrates in the leaves reduced the efficiency of the Calvin-Benson cycle and ATP/NADPH in Mg-deficient leaves. The down-expressed genes related to cyclic electron transfer (CRR7, NDHB, PNSB, PNSB4, PNSB5) further demonstrated that Mg deficiency may weaken cyclic electron transfer during photosynthesis. Therefore, the reduction in the photosynthetic capacity of Mg-deficient tomato plants was the result of a combination of decreased carbon assimilation capacity, damaged photosynthetic components, changed photosynthetic electron transport and distribution. The findings of this study provide a comprehensive understanding of the underlying mechanisms by which Mg deficiency reduces the photosynthetic performance of tomato leaves and offer a theoretical basis for breeding Mg-tolerant tomato varieties.