We study direct and indirect excitons in Rydberg states in phosphorene monolayers, bilayer and van der Waals (vdW) heterostructure in an external magnetic field, applied perpendicular to the monolayer or heterostructure within the framework of the effective mass approximation. Binding energies of magnetoexcitons are calculated by a numerical integration of the Schrodinger equation using the Rytova-Keldysh potential for direct magnetoexcitons and both the Rytova-Keldysh and Coulomb potentials for indirect one. The latter allows to understand the role of screening in phosphorene. We report the magnetic field energy contribution to the binding energies and diamagnetic coefficients (DMCs) for magnetoexcitons that strongly depend on the effective mass of electron and hole and their anisotropy and can be tuned by the external magnetic field. We demonstrate theoretically that the vdW phosphorene heterostructure is a novel category of 2D semiconductor offering a tunability of the binding energies of magnetoexcitons by mean of external magnetic field and control the binding energies and DMCs by the number of hBN layers separated two phosphorene sheets. Such tunability is potentially useful for the devices design.