The retina constitutes the first stages of vision, an exposed part of our nervous system that transduces light into a sophisticated and efficient binary code conveying everything we can know about the visual world. This thesis details attempts to understand these neural computations. First I present theoretical work showing how the retina constructs an efficient yet diverse cell population, providing an explanation for how and why parallel inhibitory pathways generate the retinal ganglion cell classical receptive field. This first study builds on more than a century of using artificial stimuli to understand the retina. However, the normal function of the retina is to convey information about the natural visual world, and yet we currently lack methods to understand retinal computations in their native regime. In the second part I present a way forward using modern deep learning techniques to learn accurate models of the retina under natural conditions. These artificial neural network models of the retina allow unprecedented insight into the structure and function of the retina---we find that they reproduce known retinal phenomena, have internal units that are highly correlated with interneuron responses, and allow for the discovery of new retinal phenomena and mechanisms. These models provide a powerful and transparent framework for testing hypotheses and understanding sensory computations in their natural setting. The thesis concludes with how principles learned from the computations of biological vision can lead to better artificial neural networks for computer vision.