Deterministic integration of phase-pure Ruddlesden-Popper (RP) perovskites has great significance for realizing functional optoelectronic devices. However, precise fabrications of artificial perovskite heterostructures with pristine interfaces and rational design over electronic structure configurations remain a challenge. Here, the controllable synthesis of large-area ultrathin single-crystalline RP perovskite nanosheets and the deterministic fabrication of arbitrary 2D vertical perovskite heterostructures are reported. The 2D heterostructures exhibit intriguing dual-peak emission phenomenon and dual-band photoresponse characteristic. Importantly, the interlayer energy transfer behaviors from wide-bandgap component to narrow-bandgap component modulated by comprising quantum wells are thoroughly revealed. Functional nanoscale photodetectors are further constructed based on the 2D heterostructures. Moreover, by combining the modulated dual-band photoresponse characteristic with double-beam irradiation modes, and introducing an encryption algorithm mechanism, a light communication system with high security and reliability is achieved. This work can greatly promote the development of heterogeneous integration technologies of 2D perovskites, and could provide a competitive candidate for advanced integrated optoelectronics.