Since the wavelength of a light wave is very small in comparison to sound wave, diffraction effects are not noticeable and the light almost travels in a straight line. Hence the cardboard is opaque and we cannot see the light.
In the case of sound waves the diffraction, reflection and refraction are prominent so it can be heard. Sound waves not only bend near the end of cardboard but it can vibrate the cardboard which in turn vibrate the air molecules on the other side to propagate the sound.