Frogs and toads (Amphibia: Anura) display diverse ecologies and behaviours, which are often correlated with visual capacity in other vertebrates. Additionally, anurans exhibit a broad range of relative eye sizes, which have not previously been linked to ecological factors in this group. We measured relative investment in eye size and corneal size for 220 species of anurans representing all 55 currently recognized families and tested whether they were correlated with six natural history traits hypothesized to be associated with the evolution of eye size. Anuran eye size was significantly correlated with habitat, with notable decreases in eye investment among fossorial, subfossorial and aquatic species. Relative eye size was also associated with mating habitat and activity pattern. Compared to other vertebrates, anurans have relatively large eyes for their body size, indicating that vision is probably of high importance. Our study reveals the role that ecology and behaviour may have played in the evolution of anuran visual systems and highlights the usefulness of museum specimens, and importance of broad taxonomic sampling, for interpreting macroecological patterns.