Protein photoreceptors use small-molecule cofactors called chromophores to detect light. Only under the influence of the receptors' active sites do these chromophores adopt spectral and photochemical properties that suit the receptors' functional requirements. This protein-induced change in chromophore properties is called photochemical tuning and is a prime example for the general--but poorly understood--process of chemical tuning through which proteins shape the reactivity of their active-site groups. Here we report the 0.82-A resolution X-ray structure of the bacterial light receptor photoactive yellow protein (PYP). The unusually precise structure reveals deviations from expected molecular geometries and anisotropic atomic displacements in the PYP active site. Our analysis of these deviations points directly to the intramolecular forces and active-site dynamics that tune the properties of PYP's chromophore to absorb blue light, suppress fluorescence, and favor the required light-driven double-bond isomerization.