Peel browning is a natural phenomenon that adversely affects the appearance of fruits. Research on the regulation of browning in apples (Malus × domestica Borkh.) has mainly focused on postharvest storage, while studies at the preharvest stage are relatively rare. Apple is an economically important horticultural crop prone to peel browning during growth, especially when the fruits are bagged (dark conditions). The present study's integrated transcriptomics and metabolomics analysis revealed that preharvest apple peel browning was primarily due to changes in phenolics and flavonoids. The detailed analysis identified MdLAC7's (laccase 7) role in the preharvest apple peel browning process. Transient injection, overexpression, and CRISPR/Cas9 knockout of the MdLAC7 gene in apple fruit and calli identified vallinic acid, anthocyanidin, tannic acid, sinapic acid, and catechinic acid as its catalytic substrates. In addition, yeast one-hybrid assay, electrophoretic mobility shift assay, luciferase reporter assay, and ChIP-PCR analysis revealed that MdWRKY31 binds to the promoter of MdLAC7 and positively regulates its activity to promote peel browning of bagged fruits (dark conditions). Interestingly, upon light exposure, the light-responsive transcription factor MdHY5 (ELONGATED HYPOCOTYL 5) bound to the promoter of MdWRKY31 and inhibited the gene's expression, thereby indirectly inhibiting the function of MdLAC7. Subsequent analysis showed that MdHY5 binds to the MdLAC7 promoter at the G-box1/2 site and directly inhibits its expression in vivo. Thus, the study revealed the MdLAC7-mediated mechanism regulating preharvest apple peel browning and demonstrated the role of light in inhibiting MdLAC7 activity and subsequently reducing peel browning. These results provide theoretical guidance for producing high-quality apple fruits.