Glaucoma, a prevalent and potentially blinding eye disease, is linked to a variety of factors, including elevated intraocular pressure, optic nerve damage, and oxidative stress. In recent years, dietary habits, as a controllable lifestyle factor, have received increasing attention in the prevention and treatment of glaucoma. The purpose of this review was to investigate the effects of dietary factors on glaucoma, with a particular emphasis on two common dietary patterns: the high-salt diet and the Mediterranean diet. In addition, we investigated the association between many particular nutrients (including omega-3 fatty acids, vitamins, caffeine, and minerals) and glaucoma to fully assess the potential involvement of dietary variables in glaucoma pathogenesis, prevention, and treatment. This article reveals the importance of dietary components in glaucoma prevention and explores prospective possibilities for future research by conducting a comprehensive review of previous scientific studies.