The electronic and optical properties of monolayer transition-metal dichalcogenides (TMDs) and van der Waals heterostructures are strongly subject to their dielectric environment. In each layer the field lines of the Coulomb interaction are screened by the adjacent material, which reduces the single-particle band gap as well as exciton and trion binding energies. By combining an electrostatic model for a dielectric hetero-multi-layered environment with semiconductor many-particle methods, we demonstrate that the electronic and optical properties are sensitive to the interlayer distances on the atomic scale. Spectroscopical measurements in combination with a direct solution of a three-particle Schrodinger equation reveal trion binding energies that correctly predict recently measured interlayer distances.