A recent scientific debate has arisen: Which processes underlie the actual ground of the valley Hall effect (VHE) in two-dimensional materials? The original VHE emerges in samples with ballistic transport of electrons due to the anomalous velocity terms resulting from the Berry phase effect. In disordered samples though, alternative mechanisms associated with electron scattering off impurities have been suggested: (i) asymmetric electron scattering, called skew scattering, and (ii) a shift of the electron wave packet in real space, called a side jump. It has been claimed that the side jump not only contributes to the VHE but fully offsets the anomalous terms regardless of the drag force for fundamental reasons and, thus, the side-jump together with skew scattering become the dominant mechanisms. However, this claim is based on equilibrium theories without any external valley-selective optical pumping, which makes the results fundamentally interesting but incomplete and impracticable. We develop in this paper a microscopic theory of the photoinduced VHE using the Keldysh nonequilibrium diagrammatic technique and find that the asymmetric skew scattering mechanism is dominant in the vicinity of the interband absorption edge. This allows us to explain the operation of optical transistors based on the VHE.