In the last decade, we have witnessed a number of cases where a small deviation from crystallographic or average structure strongly modifies electron states, physical and chemical properties and functions. The crucial role of breaking local symmetry, stabilizing a certain electronic (spin-state) configuration, has been recognized recently, by x-ray absorption spectroscopy (XAS). In biological systems such as haeme proteins, having 3d transition metal ions at active sites in a large molecule, XAS studies clarified the intimate relation between the local structure and the spin state. A number of high Tc superconducting oxides have been investigated and a generic behavior of local lattice as an intrinsic tendency of highly correlated electrons is revealed. We find anomalous local lattice distortions in YBa2Cu3Oy emerge at characteristic temperatures T* and T0 associated with changes of electron states, indicating a strong electron-lattice coupling. We demonstrate that in situ XAS can probe the local lattice distortions during photo-excitation. XAS showed that photo-induced nonthermal melting occurs in chalcogenide glasses and the frozen-in local lattice distortions cause Coulomb repulsion observed as photo-structural change.