Chemiluminescence is the reaction of two chemicals to produce a high energy intermediate that decomposes to release energy in the form of light. My question is why is the energy not released as heat? There is nothing that I have found online that says why it can't be released as heat or why it is specifically released as light. The reason I am asking is if there is a way to completely emit energy in a singular form and if we could control the proportions with which one reaction releases heat we could make certain reactions universally more efficient.
The mechanism of light emission in chemiluminescence is identical to fluorescence/phosphorescence. The high energy intermediates in chemiluminescence are in their electronically excited states and relax back to the ground state by emitting a photon. The excited state is just reached differently (via a chemical reaction and not an excitation by light). Thus, the question of why the energy is released in the form of light and not heat is similar to the question of why some materials fluoresce/phosphoresce.
We will now focus on molecules, which is the important part for chemiluminescence. Whether an excited molecule emits light or gives off heat has to do with its specific electronic structure. There are certain geometries in a molecule (if you deform the molecules just right) where the electronic ground state and excited state come very close to each other and the coupling between them is very strong. At these geometries, the molecules can relax to the ground state without emitting a photon. If the molecule can reach these points by wiggling around in the excited state (at a normal temperature) it will give off energy as heat and will not luminesce. This is called internal conversion/intersystem crossing and happens in most molecules. If a molecule can't reach these points it is trapped in the excited state and will give off the energy slowly as light. Only then can we see luminescence.
The emission of photons (e.g. light) occurs when the reaction energy is released through an electronic transition. The emission of heat occurs when the reaction energy is released through molecular translations, rotations, or vibrations. The relative efficiency to produce photons or heat depends on factors such as the size and electronic (orbital) structure of the molecule. We control the ratio by designing the molecular structure, for example to limit one form of energy release in favor of the other.