The secondary electron (SE) signal over a cleaved surface of GaAs p-i-n solar cells containing stacks of quantum wells (QWs) is analyzed by high-resolution scanning electron microscopy. The InGaAs QWs appear darker than the GaAsP barriers, which is attributed to the differences in electron affinity. This method is shown to be a powerful tool for profiling the conduction band minimum across junctions and interfaces with nanometer resolution. The intrinsic region is shown to be pinned to the Fermi level. Additional SE contrast mechanisms are discussed in relation to the dopant regions themselves as well as the AlGaAs window at the p-region. A novel method of in situ observation of the SE profile changes resulting from reverse biasing these structures shows that the built-in potential may be deduced. The obtained value of 0.7 eV is lower than the conventional bulk value due to surface effects.