The cathodoluminescence technique (CL) performed in the Scanning Electron Microscope (SEM) offers opto-electronic characterization of some nanostructures and it is a powerful tool for studying the compositional variation or band structure of three-dimensional microscale or nanoscale structures. The major problem of the CL technique is the difficulty of high spatial resolution of the low-dimensional structure. In the present paper we propose a simple Monte Carlo calculation model to describe the interaction of electron beam with Al x Ga 1-x As - GaAs nanostructure. This model takes into account the confinement phenomenon in the quantum well by an easy method. The influence of different parameters such as the thickness of barriers, Al mole fraction (x), and the diffusion length are studied. The carrier excess generated during the collision of the incident electron with the atoms of the material (random walk) is calculated taking into account the confinement phenomenon within the quantum well. The radiative recombination of electron–hole pairs is collected as a light (CL signal).