Is it possible to react chlorine with hydrogen under a UV lamp during the electrolysis of salty water?
I advise you not to attempt a reaction of hydrogen and chlorine gas by light!

Do not attempt it unless you know exactly what you are doing and have seen the experiment be performed by others!

You’re actually rather lucky that one of the following happened:


the black light gave the wrong wavelength
there were too small concentrations of hydrogen gas and chlorine gas to react with each other.


The reaction of hydrogen and chlorine is a radical chain reaction and rather exothermic. There is no change in the amount of substance involved, so entropic effects do not play a role. However, it is an explosive reaction and was often used in the introductory inorganic chemistry course at my university to give off a loud bang (and send the tin can in which the gases were mixed flying).

The reaction is triggered by light energy interacting with chlorine; the first (initiation) step is the generation of chlorine radicals by the following equation:

$$\ce{Cl2 -&gt;[$h\nu$] 2 Cl^.}\tag{1}$$

This chain then propagates according to reactions $(2)$ and $(3)$.

$$\ce{Cl^. + H2 -&gt; HCl + H^.}\tag{2}$$

$$\ce{H^. + Cl2 -&gt; HCl + Cl^.}\tag{3}$$

The light needed for the first step must supply chlorine’s bond dissociation energy; blue (visible) light, not UV light is actually required. But just for your safety please let me restate:

The reaction is explosive! Do not attempt it at home under any circumstance! Do not attempt it unless you know exactly what you are doing!