Weakly bound systems, like noble-gas dimers or two-dimensional layered materials (graphite, hexagonal boron nitride, or transition-metal dichalcogenides), exhibit excited electronic states of a particular nature. These so-called exciplex states combine on-site (or intralayer) and charge-transfer (or interlayer) configurations in a well-balanced way. We show by ab initio many-body perturbation theory that the energy and composition of the exciplex states depend sensitively on the bond length or interlayer distance of the material. When the constituents approach each other, the charge-transfer contribution increases and the excitation is redshifted to lower energy. If the system is excited into the exciplex state, then a covalent-like bond results. In consequence, noble-gas dimers form excimer complexes, while layered materials exhibit interlayer contraction.