We performed ab initio calculations of the electronic structures of bulk CdSe and CdTe and of their interface. We employed the local-density approximation-1/2 self-energy correction scheme [L. G. Ferreira, M. Marques, and L. K. Teles, Phys. Rev. B 78, 125116 (2008)] to obtain improved band gaps and band offsets, as well as spin-orbit coupling to further correct the valence band edges. Our results are in good agreement with experimental values for bulk band gaps and reproduce the staggered band alignment characteristic of this system. We found that the spin-orbit effect is of considerable importance for the bulk band gaps, but has little impact on the band offset of this particular system. Moreover, the electronic structure calculated along the 61.4 Å transition region across the CdSe/CdTe interface shows a non-monotonic variation of the bandgap in the range 0.8-1.8 eV. This finding may have important implications to the absorption of light along the interface between these two materials in photovoltaic applications. V