We study the formation and destruction of the first molecules at the epochs of the Dark Ages and Cosmic Dawn to evaluate the luminosity of the protogalaxy clumps (halos) in the molecular lines. The cosmological recombination is described using the RecFast model of an effective three-level atom, while the chemistry of the molecules is examined using the relevant basic kinetic equations. We then studied the effect of collisional and radiative excitation of molecules on the intensity of molecular emission in both warm and hot halos. Using the Planck data on the reionization of the intergalactic medium at z ∼ 6−8, we evaluated the upper limits of the light energy density for four models of thermal light from the first sources that appeared in the Cosmic Dawn epoch. Assuming that in the halos, the light energy density may essentially be even higher, we estimated the impact of the light from the first sources (the first light) on the formation and destruction of the first molecules in them as well as between them. We show that the molecules H2 and HD are destroyed by photodissociation processes shortly before the full reionization in the inter-halo medium, in the medium of both types of halos and for all models of the first light. At the same time, the number density of helium hydride ions, HeH+, shows essentially more complicated dependences on the kinetic temperature of halos and the models of the first light. These features characterizing the abundance of molecules also determine the intensity of the halos luminescence during their evolution. Furthermore, we calculated the evolution of the brightness temperature of the individual halo in the rotational lines of H2, HD and HeH+ molecules relative to the temperature of the cosmic microwave background at redshifts corresponding to the Dark Ages and Cosmic Dawn epochs. It does not exceed the microkelvin, but its detection may be an important source of information about the physical processes taking place at the beginning of the formation of the first stars and galaxies at the epochs of the Dark Ages and Cosmic Dawn.