The speed of sound is maximum in a solid medium because the molecules are closer together, allowing sound waves to travel more quickly through it.