Legibility is distinct from readability, though the terms are often conflated. Legibility refers to the clarity of individual letterforms — whether a lowercase "l" can be distinguished from a capital "I" and the digit "1"; whether the apertures of "c" and "e" are open enough to differentiate them at small sizes. Readability refers to how comfortable a body of text is to read over time — a product of legibility, leading, column width, contrast, and many other factors.
The factors that make a typeface legible are architectural: generous x-height (the height of lowercase letters relative to capitals), open apertures (the openings in letters like "c", "e", "a"), clear differentiation between similar letterforms (1, l, I; 0, O; u, n), and appropriate stroke contrast. These are design decisions made by type designers; the product designer's role is to choose typefaces appropriate to the task and the size at which they will appear.
Legibility degrades at small sizes, low contrast, and high noise. Text set at 10px on a mid-grey background over a textured image is a legibility failure in three dimensions simultaneously. The increasing resolution of screens (retina, OLED) has helped, but it has also created overconfidence: designers who work at 2x resolution forget that many users still see 1x. Legibility must be tested at the actual resolution and contrast of the target device.