In the example of a prism splitting light into various paths for different wavelengths, the phenomenon is a combination of refraction and dispersion.
Refraction refers to the bending of the path of a light ray due to a change in the speed change from one medium to another. But this by itself is not enough to split light into colors. There is also dispersion, which is the effect that different wavelengths have differing speeds, and shorter wavelengths slow down more than longer ones in most materials, especially glasses.
The effect of hearing low frequencies around corners better than high frequencies is called diffraction, and that's a totally different phenomenon, but it does apply to light as well as sound. Basically, diffraction tells us how good or bad an object will be in making a shadow for a wave hitting the object. If the wavelength is small compared to the object, the shadowing will be good; if the wavelength is large compared to the object, the shadowing will be poor.
Consider sound with a speed in air of about 345 m/s. A 100 Hz bass note will have a wavelength of 3.45 m, about the size of a small car, and much larger than the window openings. So bass notes from a subwoofer easily bend around common objects. On the other hand, a 600 Hz trumpet or 1000 Hz guitar riff will have a wavelength of less than a meter, and is easily shadowed by objects.