Using a Monte Carlo technique to simulate the transport of runaway electrons (REs) and X‐rays in the atmosphere and through attenuators covering detectors, we have modeled the results of experiments to detect X‐rays from triggered lightning and stepped leaders of a natural cloud‐to‐ground lightning. In the model, bremsstrahlung of high‐energy runaway electrons (REs) generated at the leader front is assumed to be the origin of X‐rays. Specific fluxes (per one RE) of photons and bremsstrahlung energy at the detectors were calculated. The analysis was executed with monoenergetic and exponential initial energy distributions of REs with different angular distributions. To reproduce the detected radiation energy of ~1–2 MeV, a generation of ~1010–1011 REs per flash is required in the case with the beam angular distribution of monoenergetic REs with the energy in the range 1–10 MeV. The same result was obtained with the exponential energy distribution of REs with the average energy 7 MeV, i.e., with the average energy in the RE avalanche. The electric field amplifies the flux of the radiation energy, and the amplification becoming stronger as the RE source approaches the ground. In the case with an isotropic angular distribution of REs in the bottom hemisphere, with no electric field, (4–5) × 109 REs are required for reproducing ~1–2 MeV of detected X‐ray energy. In addition, fluxes of photons and fluxes of their energy at the detectors, energy distributions of photons and their average energy were calculated.