We report the precise optical and X-ray localization of the 3.2 ms accretion-powered X-ray pulsar XTE J1814-338 with data from the Chandra X-Ray Observatory as well as optical observations conducted during the 2003 June discovery outburst. Optical imaging of the field during the outburst of this soft X-ray transient reveals an R = 18 star at the X-ray position. This star is absent (R > 20) from an archival 1989 image of the field and brightened during the 2003 outburst, and we therefore identify it as the optical counterpart of XTE J1814-338. The best source position derived from optical astrometry is R.A. = 18h13m39.s04, Dec.= -33d46m22.3s (J2000). The featureless X-ray spectrum of the pulsar in outburst is best fit by an absorbed power-law (with photon index = 1.41 +- 0.06) plus blackbody (with kT = 0.95 +- 0.13 keV) model, where the blackbody component contributes approximately 10% of the source flux. The optical broad-band spectrum shows evidence for an excess of infrared emission with respect to an X-ray heated accretion disk model, suggesting a significant contribution from the secondary or from a synchrotron-emitting region. A follow-up observation performed when XTE J1814-338 was in quiescence reveals no counterpart to a limiting magnitude of R = 23.3. This suggests that the secondary is an M3 V or later-type star, and therefore very unlikely to be responsible for the soft excess, making synchroton emission a more reasonable candidate.