If I showed you a compound's chemical structure will you be able to tell if it can be used as an explosive or we can only know that by conducting chemical experiments?
A compound, a mixture may explode under different conditions. As an example, for some of them it is heat, other require electric discharge or mecanical impact to decompose. There are classes of compounds with known examples of explosives (azides, picrates, fulminates) so one may infer new compounds within these classes equally might be explosives, too.
Among modern explosives, increasing the number of nitrogroups or / and increase of nitrogen content over other elements present is a theme, like octanitrocubanes. See the Klapötke group in Munich / Germany working on 5,5’-azotetrazolate salts, too.
(dihydrazinium 5,5’-azotetrazolate dihydrazinate, source)