The algorithms used by the ATLAS Collaboration to reconstruct and identify prompt photons are described. Measurements of the photon identification efficiencies are reported, using 4.9 fb- 1 of pp collision data collected at the LHC at s=7 TeV and 20.3 fb- 1 at s=8 TeV. The efficiencies are measured separately for converted and unconverted photons, in four different pseudorapidity regions, for transverse momenta between 10 GeV and 1.5 TeV. The results from the combination of three data-driven techniques are compared to the predictions from a simulation of the detector response, after correcting the electromagnetic shower momenta in the simulation for the average differences observed with respect to data. Data-to-simulation efficiency ratios used as correction factors in physics measurements are determined to account for the small residual efficiency differences. These factors are measured with uncertainties between 0.5% and 10% in 7 TeV data and between 0.5% and 5.6% in 8 TeV data, depending on the photon transverse momentum and pseudorapidity.