Tuning the bandgap of superlattice structures creates devices with unique optical, electronic and mechanical properties. Designing solar cells with superlattice structures increases the range of light energy absorbed from the solar spectrum in the device. A superlattice is a nanostructure composed of alternating thin layers of two materials. The thickness of the constituent materials alters the optical bandgap of the superlattice. This paper discusses a mathematical model which computes the effective bandgap of a CdTe/PbTe superlattice based on a given thickness of the CdTe and PbTe films. The output of this model is verified by fabricating superlattices with different thickness and measuring their effective bandgaps. The electrochemical atomic layer deposition method is used to fabricate the superlattice structures. The advantage of this method over other vacuum techniques is that it is inexpensive and operates at room temperature. This paper also discusses a method to mitigate the lattice mismatch between the substrate and the superlattice. The optical bandgaps, crystallinity, grain size and chemical composition of the structures are measured using a spectrometer, diffractometer, transmission electron microscope and scanning electron microscope, respectively. The bandgaps of the fabricated superlattices were in agreement with the simulated values. This model can be used for designing the bandgaps of superlattices which can be incorporated in solar cells.