Can an ophthalmologist diagnose learning disabilities? Also how do they test kids who can't read letters well?

See below. Opthalmologists can diagnose and treat problems related to vision. This can include problems with the eyes themselves or problems with the part of the brain that processes the signals that come in to the eyes. A child can certainly have problems in school if they are not seeing well. A good eye examination should be part of any overall assessment for a child having problems in school.
No. Vision problems can interfere with learning, but they do not cause primary dyslexia or learning disabilities. There is no scientific evidence to support eye exercises, vision therapy, or special tinted lenses/filters. Dyslexia is a language-based disorder that often can be predicted by assessments of a 5-6 year old's ability to process the sound structure of language, aka phonological awareness.