The impact of various intrinsic point defects and layer thicknesses on the electronic structure and optical properties of pn-type SnO/MoS2 heterojunctions has been investigated using first-principles calculations in this study. SnO/MoS2 heterojunctions are indirect bandgap semiconductors, with a narrower bandgap compared to monolayer SnO and MoS2, which decreases with increasing thickness of SnO or MoS2 layers. Intrinsic vacancy defects with different valence states were introduced using the transfer to the real state model method, which ensures that ionized electrons or holes are placed in the real band edge states. The primary intrinsic vacancy defects in the SnO/MoS2 heterojunction are Sn vacancies, and the valence states of the defects significantly influence the defect formation energy. Under different growth conditions, the dominant defects transition between VSn2−, VSn−, VO, and VS as the Fermi level varies. The intrinsic monolayer (1/1) SnO/MoS2 heterojunction exhibits weak n-type doping characteristics, while the introduction of VSn− defects leads to a shift towards p-type doping. As the number of SnO layers increases, VSn2− and VS defects introduce defect levels of different degrees in the bandgap, acting as electron–hole recombination centers and facilitating the transition between p-type doping and metallic conductivity characteristics. Increasing the number of MoS2 layers introduces localized defect energy levels in the bandgap, leading to p-doping or n-doping characteristics. The intrinsic SnO/MoS2 heterojunction primarily absorbs in the near-ultraviolet region, while also exhibiting a certain absorption capacity in the visible and deep ultraviolet regions. The presence of Sn and S defects can enhance the response to visible light absorption.