Gas puff imaging is a two-dimensional diagnostic that measures the edge D light emission from a neutral D2 gas puff near the outer midplane of the National Spherical Torus Experiment (NSTX). DEGAS 2 is a three-dimensional Monte Carlo code used to model neutral transport and plasma-neutral interactions in fusion plasmas. In this paper, we compare the measured and modeled D light emission for specific NSTX experiments. Both the simulated spatial distribution and the radiance of the D light emission agree well with the experimental data obtained during time periods between edge-localized modes (ELMs) in ELMy H-modes.