Anisocoria is diagnosed through a comprehensive eye examination, which may include measurements of pupil size, assessment of pupil reactions, and evaluation for underlying causes.