Background: In fly photoreceptors, light is focused onto a photosensitive waveguide, the rhabdomere, consisting of tens of thousands of microvilli. Each microvillus is capable of generating elementary responses, quantum bumps, in response to single photons using a stochastically operating phototransduction cascade. Whereas much is known about the cascade reactions, less is known about how the concerted action of the microvilli population encodes light changes into neural information and how the ultrastructure and biochemical machinery of photoreceptors of flies and other insects evolved in relation to the information sampling and processing they perform. Results: We generated biophysically realistic fly photoreceptor models, which accurately simulate the encoding of visual information. By comparing stochastic simulations with single cell recordings from Drosophila photoreceptors, we show how adaptive sampling by 30,000 microvilli captures the temporal structure of natural contrast changes. Following each bump, individual microvilli are rendered briefly (∼100-200 ms) refractory, thereby reducing quantum efficiency with increasing intensity. The refractory period opposes saturation, dynamically and stochastically adjusting availability of microvilli (bump production rate: sample rate), whereas intracellular calcium and voltage adapt bump amplitude and waveform (sample size). These adapting sampling principles result in robust encoding of natural light changes, which both approximates perceptual contrast constancy and enhances novel events under different light conditions, and predict information processing across a range of species with different visual ecologies. Conclusions: These results clarify why fly photoreceptors are structured the way they are and function as they do, linking sensory information to sensory evolution and revealing benefits of stochasticity for neural information processing.