With the rapid development of artificial intelligence (AI) technology, the application of AI technology based on deep learning (DL) and machine learning (ML) in the medical field has received widespread attention. The application of AI in ophthalmology is gradually being shifted to a more comprehensive and in-depth level. Trained on corneal tomography, optical coherence tomography (OCT), slit-lamp images, and other techniques. AI can achieve robust performance in the diagnosis and treatment of corneal lesions, conjunctival lesions, cataract, glaucoma and other ophthalmic diseases. However, there are also some challenges in the application of AI in ophthalmology, including the lack of interpretability of results, lack of standardization of data sets, uneven quality of data sets, insufficient applicability of models and ethical issues. In the era of 5G and telemedicine, there are also many new opportunities for ophthalmic AI. In this review, we provided a summary of the state-of-the-art AI application in anterior segment ophthalmic diseases, potential challenges in clinical implementation and its development prospects, and provides reference information for the further development of artificial intelligence in the field of ophthalmology.