This derivation is often neglected, because it is slightly involved (for an ungergraduate presentation) in Newton's way of thinking, with explicit forces, although this is how Newton did it, and it is a little too trivial if you use stress tensor concepts. I will use the stress tensor concept.
Momentum is a conserved quantity, and you should be familiar with the conservation law in differential form:
$$ \partial_t \rho + \partial_i J^i = 0 $$
Where the repeated i index is summed (Einstein convention). This is clearest in space-time, where the density $\rho$ becomes the time component of a 4-vector, but it is just as true in Galilean Newtonian mechanics.
For momentum, you have three separate conserved momentum densities $p^i$ which obey a conservation law:
$$ \partial_t p^i + \partial_i T^{ij} = 0 $$
Where the interpretation of $T^{ij}$ is that it is the flow of the i'th component of p in the j direction. There are three equations, since there are three separate conserved quantities--- the x,y,z momentum.
If you compress a region of air, you get a little bit more pressure. The form of pressure is a diagonal stress density, by rotational symmetry (it is also intuitive--- pressure pushed out--- so x-momentum goes in the x direction, y-momentum goes in the y-direction and so on).
The stress T for a pressure is therefore
$$ T^{ij} = P(\rho) \delta^{ij} $$
If the material starts out at position x (at each x there is a different infinitesimal volume of material) and the material which would be at x when everything is still is moved at time t to x+\delta X(x,t), then the momentum density is
$$ p^{i} = \rho {\partial_t X(x,t)}$$
Assuming $\rho = \rho_0(1 - \delta v)$ where the infinitesimal volume compression, which gives the change in the density, is given by the divergence of X (this is geometrically clear if you draw a picture, or just from the definition of divergence)
$$\delta v = \partial_j X^j $$
To first infinitesimal order, then the pressure is
$$ P (\rho) = P(\rho_0) - C\delta v = P(\rho_0) - C \partial_i X^i $$
Where $ C= {dP\over d\rho}$
Now, for mathematical convenience (I do not want to deal with transverse sound), consider reducing to one dimension. In this case X(x) is just a one-dimensional function that tells you the displacement, and the stress is just $T^{11} = \rho_0 \partial_x X$ (the flow of x-momentum in the x-direction).
The continuity equation in 1d gives you
$$ \rho_0 \partial^2_t X - \rho_0 C \partial^2_x X = 0 $$
And this is the wave equation with the speed of sound squared equal to C. You can repeat the 1d analysis with detailed forces, not using the slightly more abstract continuity equation, and this is what Newton did to find the speed of sound way back when.