Zero-dimensional perovskite materials, characterized by broadband emission caused by self-trapped excitons, are promising materials for stimuli-responsive and photo-writeable encryption. However, existing research is focused on the effects of structural phase transitions on photophysical properties, and lacks in-depth understanding of the mechanisms of self-trapped excitons emission. Here, we demonstrate that the dehydration reaction in zero-dimensional antimony halide clusters significantly enhances the self-trapped excitons emission without inducing structural phase transition, resulting in a substantial increase in photoluminescence (PL) quantum yield from 3.5% to 91.4%. In-situ X-ray diffraction and PL techniques were employed to shed light on the relationship between the crystal structure and radiative recombination, demonstrating the introduction of rich lattice distortion during the dehydration process. Temperature-dependent PL spectra and transient absorption spectra suggest that the lattice distortion causes the moderate electron-phonon coupling strength and high exciton binding energy, facilitating self-trapped excitons to relax from the non-radiative recombination singlet state to the radiative recombination triplet state, corresponding to the enhanced emission intensity. As a proof of concept, several switchable PL applications have been established in scenarios such as anti-counterfeiting, rewritable luminescent paper, and humidity sensing. This finding elucidates the emission mechanism of self-trapped excitons and provides a novel avenue for designing switchable luminescent materials.