TL;DR: What differs phonons from photons is that phonons require presence of a medium, where the movement of the medium constitutes a field to be quantized. Photons are electromagnetic waves - they do not require any matter other than their own electromagnetic field to exist.
What are phonons
Phonons can be viewed as quantized elastic waves. Indeed, while typical textbook discussions of phonons start with considering vibrations of the atoms, phonons are usually treated in long-wavelength limit (akin to the effective mass approximation for electrons), that is in continuum approximation for solids. Indeed, e.g., AGD derive phonon Hamiltonian and the electron-phonon interaction directly from considering deformations in continuum.
Sound in air
In principle, sound in air is pressure waves, described by a wave equation, which can be formally quantized. However, this does not make much sense from the physical point of view, as we are not likely to observe any quantum effects. Indeed, the wave equation for sound waves implicitly contains thermodynamic approximation - it is obtained from the fluid dynamics equations, which are in tern obtained from the BBGKY hierarchy under several assumptions, including that of the local thermodynamic equilibrium. In other words, all the quantum effects are washed out.
In simpler terms: sound waves do not correspond to any synchronous motion of molecules in the air, but rather to pressure propagation, which is governed by molecular diffusion.
Quantized sound waves
The quantization of sound waves is important when considering Bose-Einstein condensates and other quantum liquids, where one has to consider phonons. These are not gases, but neither they are a solid state.
Plasma waves
A similar situation arises in plasma: waves in gaseous plasma are well treated in classical approximation, but the electron plasma in solid state is described as plasmons, i.e., quantized plasma waves.
Related:
Could Navier-Stokes equation be derived directly from Boltzmann equation?
Is differentiating particle and quasiparticle meaningless?
Quantum description of water
Photon effective mass in plasma
Remarks:
Contrary to photons that are particles that can exist both in free space as well as inside an optical cavity, it seems like phonons are quasiparticles defined only in a solid (i.e. a cavity for sound). Is this the case?
As I tried to explain above, phonons are collective excitations, and can be observed in liquids, i.e., in absence of a crystal lattice. They are also not the only such excitations - plasmons is another example.
However, it is incorrect to think of a solid as a cavity for sound: cavity implies confinement in space. Sound waves in air can exist in cavities - as, e.g., musical instruments or concert halls. On the other hand, phonons in a solid state can exist in an infinite solid - that is without any confinement. In this sense, what differs them from photons is that phonons require presence of a medium, where the movement of the medium constitutes a field to be quantized. Photons are electromagnetic waves - they do not require any matter other than their own electromagnetic field to exist.
https://en.wikipedia.org/wiki/Goldstone_boson
– Heidar Jun 18 '23 at 23:28