Interfaces formed by high energy density materials and metal oxides present intriguing new opportunities for a large set of novel applications that depend on the control of the energy release and initiation of explosive chemical reactions. We studied the role of structural defects at a MgO surface in the modification of electronic and optical properties of the energetic material TNT (2-methyl-1,3,5-trinitrobenzene, also known as trinitrotoluene, C7H5N3O6) deposited at the surface. Using density functional theory (DFT)-based solid-state periodic calculations with hybrid density functionals, we show how the control of chemical explosive reactions can be achieved by tuning the electronic structure of energetic compound at an interface with oxides. The presence of defects at the oxide surface, such as steps, kinks, corners, and oxygen vacancies, significantly affects interfacial properties and modifies electronic spectra and charge transfer dynamics between the oxide surface and adsorbed energetic material. As a result, the electronic and optical properties of trinitrotoluene, mixed with an inorganic material (thus forming a composite), can be manipulated with high precision by interactions between TNT and the inorganic material at composite interfaces, namely, by charge transfer and band alignment. Also, the electron charge transfer between TNT and MgO surface reduces the decomposition barriers of the energetic material. In particular, it is shown that surface structural defects are critically important in the photodecomposition processes. These results open new possibilities for the rather precise control over the decomposition initiation mechanisms in energetic materials by optical excitations.