In molecular solids, photoluminescence of dye molecules is often suppressed owing to excitonic coupling with adjacent chromophores. Here the authors use a computational method to predict the optimal alignment of naphthalenediimide linkers in metal–organic frameworks to afford J-aggregates, and demonstrate the same by fabricating highly photoluminescent thin film.