Diptera is one of the biggest insect orders and displays a large diversity of visual adaptations. Similarly to other animals, the dipteran visual process is mediated by opsin genes. While the diversity and function of these genes is well studied in key model species, a comprehensive comparative genomic study across the dipteran phylogeny is missing. Here we mined the genomes of 61 dipteran species, reconstructed the evolutionary affinities of 528 opsin genes and determined the selective pressure acting in different species. We found that opsins underwent several lineage-specific events, including an independent expansion of Long Wave Sensitive opsins in flies and mosquitoes, and numerous family-specific duplications and losses. Both the Drosophila and the Anopheles complement is derived in comparison with the ancestral dipteran state. Molecular evolutionary studies suggest that gene turnover rate, overall mutation rate, and site-specific selective pressure are higher in Anopheles than in Drosophila. Overall, our findings indicate an extremely variable pattern of opsin evolution in dipterans, showcasing how two similarly aged radiations, Anopheles and Drosophila, are characterized by contrasting dynamics in the evolution of this gene family. These results provide a foundation for future studies on the dipteran visual system.