Aurorae and nightglow are faint atmospheric emissions visible during night-time at several wavelengths. These emissions have been extensively studied but their polarization remains controversial. A great challenge is that light pollution from cities and scattering in the lower atmosphere interfere with polarization measurements. We introduce a new polarized radiative transfer model able to compute the polarization measured by a virtual instrument in a given nocturnal environment recreating real world conditions (atmospheric and aerosol profiles, light sources with complex geometries, terrain obstructions). The model, based on single scattering equations in the atmosphere, is tested on a few simple configurations to assess the effect of several key parameters in controlled environments. {Our model constitutes a proof of concept for polarization measurements in nocturnal conditions, that calls for further investigations. In particular, we discuss how multiple-scattering (neglected in the present study) {could} impact our observations and their interpretation, and the future need for inter-calibrating the source and the polarimeter in order to optimally extract the information contained in this kind of measurements. The model outputs are compared to field measurements in five wavelengths. A convincing fit between the model predictions and observations is found in the three most constrained wavelengths despite the single scattering approximation. Several applications of our model are discussed that concern the polarization of aurorae, the impact of light pollution, or aerosols and air pollution measurements.}