The perception of different colors, such as red, green, or blue, is caused by different wavelengths of light.
Due to the fact that light has different wavelengths, we can perceive different colors with our sight. As a matter of fact, light has no color - it is just because of its refraction and different wavelengths that we can see a certain number of colors - some people may see more, some may see fewer.