The structural, electronic and optical properties of IIA–VIA compounds are performed, by using the full-potential linearized augmented plan wave (FP-LAPW) method within DFT, by using the (PBEsol-GGA 2008) version. We have compared the modified Becke–Johnson (mBJ) potential to LDA, GGA and EV-GGA approximations. The IIA–VIA compounds have rock salt structure (B1) and zinc-blend structure (B3). The results obtained for band structure using mBJ show a significant improvement over previous theoretical work and give closer values to the experimental results. The bandgaps less than 3.1eV are used in the visible light devices applications, while those with bandgaps bigger than 3.1eV, used in UV devices applications. Optical parameters, like the dielectric constant, refractive indices, reflectivity, optical conductivity and absorption coefficient are calculated and analyzed. Refractive index lesser than unity (v g =c/n) shows that the group velocity of the incident radiation is greater than the speed of light.