In general, passport photo regulations vary depending on the country, but most require that the applicant’s face be fully visible. This includes the eyes. So, glasses can sometimes present a challenge when it comes to taking a passport pic, and it’s better to take them off.
If you decide to keep them, make sure the eyes are visible without glare or reflections on the lenses. Some regulations may also require that spectacles do not have colored lenses or tinted glasses (so, no sunglasses), and the frame should not cover any part of the applicant’s eyes or eyebrows.