First principles calculations are performed to explore the electronic structure and optical properties of BlueP/<i>X</i> Te<sub>2</sub> (<i>X</i> = Mo, W) van der Waals heterostructures after biaxial strain has been applied. The type-II band alignments with indirect band gap are obtained in the most stable BlueP/<i>X</i> Te<sub>2</sub> heterostructures, in which the photon-generated carriers can be effectively separated spatially. The BlueP/MoTe<sub>2</sub> and BlueP/WTe<sub>2</sub> heterostructures both have appreciable absorption of infrared light, while the shielding property is enhanced. The increase of biaxial compressive strain induces indirect-direct band gap transition and semiconductor-metal transition when a certain compressive strain is imposed on the heterostructures, moreover, the band gap of the heterostructures shows approximately linear decrease with the compressive strain increasing, and they undergo a transition from indirect band gap type-II to indirect band gap type-I with the increase of biaxial tensile strain. These characteristics provide an attractive possibility of obtaining novel multifunctional devices. We also find that the optical properties of BlueP/<i>X</i> Te<sub>2</sub> heterostructures can be effectively modulated by biaxial strain. With the increase of compression strain, the absorption edge is red-shifted, the response of light absorption extends to the mid-infrared light and the absorption coefficient increases to 10<sup>–5</sup> cm<sup>–1</sup> for the two heterostructures. The BlueP/MoTe<sub>2</sub> shows stronger light absorption response than the BlueP/WTe<sub>2</sub> in the mid-infrared to infrared region and the <i>ε</i><sub>1</sub>(0) increases significantly. The BlueP/<i>X</i> Te<sub>2</sub> heterostructures exhibit modulation of their band alignment and optical properties by applied biaxial strain. The calculation results not only pave the way for experimental research but also indicate the great potential applications of BlueP/<i>X</i>Te<sub>2</sub> van der Waals heterostructures in narrow band gap mid-infrared semiconductor materials and photoelectric devices.