We investigated a single heterojunction solar cell with stannite phase Cu2HgSnS4 as a new potential absorber material using the hybrid density functional theory for materials parameter and macroscopic device simulation studies for the photovoltaic response. The lattice constants are optimized using PBEsol and GGA exchange-correlation approach with mBJ parameterization and considering spin-orbit coupling effect on heavy element Hg, while strong correlation of Cu and Hg 3d electrons are taken into account by Hubbard parameter U = 0.52 Ry. The computed bandgap is -1.33 eV. The effective mass of electrons and holes in the respective band edges (electron in conduction band and the hole in the valence band) is 0.25 m0 and 0.91 m0, respectively. Further, the computed materials optoelectronic parameters are used to optimize the device performance by introducing a variation in minority carrier lifetime, defect concentration in Cu2HgSnS4 absorber, Cu2HgSnS4/CdS interface, and the absorber thickness to achieve a realistic photovoltaic response. The optimal conversion efficiency is 11.6\% after taking more realistic parameters in the considered single-junction solar cell. However, the maximum photovoltaic response >17\% can be achieved by controlling absorber and interface defects together with optimal carrier concentration.