Mechanoluminescence (ML) materials enable the transformation of mechanical stimuli into optical signals. However, current ML devices have limited luminescent programmability and mechanical tunability due to the relatively simple geometries as restricted by the conventional fabrication techniques. Here, we develop a strategy that is applicable for various types of zinc sulfide (ZnS)-based phosphors for allowing the fabrication of ML elastomer into complex 2D or 3D geometries with periodic cellular structures. We demonstrate that different cellular structures with tunable mechanical properties enable programmable structure-dependent ML behaviors including anisotropic and isotropic luminescence. We further exploit the quantitative structure-stress-luminescence relationship, which provides fundamental knowledge support for designing next-generation ML-based stress sensors and wearable devices.