In this work, the electric and optical properties of few layer MoS2 were systematically investigated theoretically and experimentally, especially monolayer and bilayer. Firstly, the effects of different pseudopotentials on the calculation results of MoS2 have been investigated. It indicates that the normal-conserving pseudopotential is suitable for accurate calculations of the electronic properties. Then, for deep understanding of the photoluminescence mechanism of MoS2, the electronic structure and optical properties of MoS2 were calculated by first-principles calculations with normal-conserving pseudopotential. The density of states of bilayer MoS2 at the Fermi level is higher than that of monolayer MoS2, indicating that bilayer MoS2 has a larger carrier density. Comparing the optical properties of monolayer and bilayer MoS2, it can be concluded that along the C-axis direction, bilayer MoS2 exhibits higher absorption in the wavelength range of 496–1240 nm, while the monolayer one has a remarkable absorption below 496 nm. These findings indicate that bilayer MoS2 preferentially absorbs visible and near-infrared light, while monolayer MoS2 tends to absorb ultraviolet light. These explained the different absorption characteristics of monolayer and bilayer MoS2 and give guidance for selecting the thickness of MoS2 material in applications of optoelectronic devices.