Under appropriate experimental conditions, the threshold intensity of a visual stimulus varies as the square-root of the background illuminance. This square-root law has been observed in both psychophysical threshold experiments and in measurements of the thresholds of individual ganglion cells. A signal detection theory developed in the 1940s by H. L. de Vries and A. Rose, and since elaborated by H. B. Barlow and others, explains the square-root law on the basis of 'noise' due to fluctuations in the number of photon absorptions per unit area and unit time at the cornea. An alternative account of the square-root law--and also other threshold-vs-intensity slopes--is founded on the assumption of physiological gain control (W. A. H. Rushton, Proc, Roy. Soc. (London) B 162, 20-46, 1965; W. S. Geisler, J. Physiol. (London) 312, 165-179, 1979). In this paper, a neural model of light adaptation and gain control is described that shows how these two accounts of the square-root law can be reconciled by a stochastic gain control mechanism whose gain depends on the photon fluctuation level. The process by which spikes are generated in a ganglion cell is modeled in terms of a stochastic integrate-and-fire mechanism; this model is used to quantitatively fit toad retinal ganglion cell threshold data. A psychophysical model is then outlined showing how a statistical observer could analyze the ganglion cell spike trains generated by 'signal' and 'noise' trials in order to statistically discriminate the two conditions. The model is also shown to account for some dynamic aspects of ganglion cell responses, including ON- and OFF-responses. The neural light adaptation model predicts that--under the proper conditions--brightness matching judgments will also be subject to a square-root law. Experimental tests of the model under superthreshold conditions are proposed.