Light is a key factor affecting the growth and quality formation of Dendrobium officinale Kimura et Migo. In this study, we used D. officinale under different light conditions as experimental materials to explore the key genes that regulate its polysaccharide content. In addition, we cloned the UGPase gene and validated the gene by bioinformatics analysis and real-time quantitative PCR. Compared with the natural light control group, 494, 1630 and 599 differentially expressed genes were screened under different light quality conditions of red, blue and yellow, respectively. GO and KEGG enrichment analyses of these differentially expressed genes showed that the differentially expressed genes were enriched in the light signal transduction process under different light quality conditions. Bioinformatics analyses showed that the sequences of the genes were highly conserved with the sequences of the UGPase genes of other species, and had the highest sequence similarity with Phalaenopsis, which is also a member of the orchid family. Real-time quantitative PCR results showed that red light had the most significant promoting effect on the UGPase gene of D. officinale. In this study, we applied high-throughput sequencing technology to establish a transcriptome database of D. officinale under different light conditions and obtained a large amount of transcriptional information about D. officinale. The related genes affecting the quality of D. officinale were analysed at the transcriptional level, and the D. officinale UGPase gene was cloned, and its expression was analysed in different tissues and under different light conditions.