Onychophorans typically possess a pair of simple eyes, inherited from the last common ancestor of Panarthropoda (Onychophora + Tardigrada + Arthropoda). These visual organs are thought to be homologous to the arthropod median ocelli, whereas the compound eyes most likely evolved in the arthropod lineage. To gain insights into the ancestral function and evolution of the visual system in panarthropods, we investigated phototactic behaviour, opsin gene expression and the spectral sensitivity of the eyes in two representative species of Onychophora: Euperipatoides rowelli (Peripatopsidae), and Principapillatus hitoyensis (Peripatidae). Our behavioural analyses, in conjunction with previous data, demonstrate that both species exhibit photonegative responses to wavelengths ranging from ultraviolet to green light (370-530 nm), while electroretinograms reveal that the onychophoran eye is maximally sensitive to blue light (peak sensitivity ~480 nm). Template fits to the obtained sensitivities suggest that the onychophoran eye is monochromatic. To clarify on which type of opsin the single visual pigment is based, we localised the corresponding mRNA in the onychophoran eye and brain using in situ hybridization. Our data show that the r-opsin gene (onychopsin) is expressed exclusively in the photoreceptor cells of the eye, whereas the c-opsin mRNA is confined to optic ganglion cells and the brain. Together, our findings suggest that the onychopsin is involved in vision, whereas the c-opsin might have a photoreceptive, non-visual function in onychophorans.