In addition to well-known mechanisms of excitation of solar and stellar oscillations by turbulent convection and instabilities, the oscillations can be excited by an impulsive localized force caused by the energy release in solar and stellar flares. Such oscillations have been observed on the Sun ('sunquakes'), and created a lot of interesting discussions about physical mechanisms of the impulsive excitation and their relationship to the flare physics. The observation and theory have shown that most of a sunquake's energy is released in high-degree, high-frequency p modes. In addition, there have been reports on helioseismic observations of low-degree modes excited by strong solar flares. Much more powerful flares observed on other stars can cause 'starquakes' of substantially higher amplitude. Observations of such oscillations can provide new asteroseismic information and also constraints on mechanisms of stellar flares. I discuss the basic properties of sunquakes, and initial attempts to detect flare-excited oscillations in Kepler short-cadence data.