Recent discoveries of highly efficient solar cells based on lead iodide perovskites have led to a surge in research activity on understanding photo carrier generation in these materials, but little is known about trap states that may be detrimental to solar cell performance. Here we provide direct evidence for hole traps on the surfaces of three-dimensional (3D) CH3NH3PbI3 perovskite thin films and excitonic traps below the optical gaps in these materials. The excitonic traps possess weak optical transition strengths, can be populated from the relaxation of above gap excitations, and become more significant as dimensionality decreases from 3D CH3NH3PbI3 to two-dimensional (2D) (C4H9NH3I)2(CH3NH3I)(n-1)(PbI2)(n) (n = 1, 2, 3) perovskites and, within the 2D family, as n decreases from 3 to 1. We also show that the density of excitonic traps in CH3NH3PbI3 perovskite thin films grown in the presence of chloride is at least one-order of magnitude lower than that grown in the absence of chloride, thus explaining a widely known mystery on the much better solar cell performance of the former. The trap states are likely caused by electron-phonon coupling and are enhanced at surfaces/interfaces where the perovskite crystal structure is most susceptible to deformation.