We present here the FT-IR, DFT computation, XRD, optical, and photophysical characterization of a heterocyclic compound with thienopyrimidine and pyran moieties. TD-DFT/DMOl3 and TD-DFT/CASTEP computations were used to study the geometry of isolated and dimer molecules and their optical behavior. The indirect (3.93 eV) and direct (3.29 eV) optical energy bandgaps, HOMO–LUMO energy gap (3.02 eV), and wavelength of maximum absorption (353 nm) were determined in the gas phase with M062X/6-31+G (d, p). A thin film of the studied molecule was studied using XRD, FT-IR, and UV–Vis spectroscopy. The average crystallite size was found as 74.95 nm. Also, the photoluminescence spectroscopy revealed that the compound exhibited different emission bands at the visible range with different intensities depending on the degree of molecular aggregation. For instance, solutions with different concentrations emitted blue, cyan, and green light. On the other hand, the solid-state material produced a dual emission with comparable intensities at λmax = 455, 505, and 621 nm to cover the entire visible range and produce white emission from a single material with CIE coordinates of (0.34, 0.32) that are very similar to the ideal pure white light. Consequently, these findings could lead to the development of more attractive new luminous materials.