Modulated surface photovoltage (SPV) spectra have been correlated with the phase composition in layers of CH3NH3PbI3 (MAPbI3) prepared from MAI and PbCl2 and annealed at 100 °C. Depending on the annealing time, different compositions of MAPbI3, MAPbCl3, MACl, PbI2, and an un-identified phase were found. It has been demonstrated that evaporation of MAI and HI is crucial for the development of electronic states in MAPbI3 and that only the appearance and evolution of the phase PbI2 has an influence on electronic states in MAPbI3. With ongoing annealing, (i) a transition from p- to n-type doping was observed with the appearance of PbI2, (ii) shallow acceptor states were distinguished and disappeared in n-type doped MAPbI3, and (iii) a minimum of the SPV response related to deep defect states was found at the transition from p- to n-type doping. The results are discussed with respect to the further development of highly efficient and stable MAPbI3 absorbers for solar cells.