Human beings can perceive specific wavelengths as colors
The reason that the human eye can see the spectrum is because those specific wavelengths stimulate the retina in the human eye.
As we discussed earlier that humans are very visual creatures, but it may surprise you to know that the eye contains 70% of all the sensory receptors in the human body. The function of all photoreceptors, the rods and cones, is to respond to light with neural messages that are sent to the brain, where they are translated into images of our surroundings.
Putting simply, let's take a moment to consider the process – “How vision works”. First, light waves in the visible spectrum (that is, wavelengths that our eyes can detect, 380 to 750 nanometers approximately) strike an object. At least some wavelengths are reflected off the object to the retina of the eye. The light is absorbed by pigment molecules in the photoreceptors, causing a chemical change in the molecules. This change, in turn, changes the permeability of the plasma membrane of the photoreceptor, resulting in electrochemical changes in the receptor that initiate a neural message when they reach certain strength. The optic nerve carries nerve signals from the retina to the back of the brain, where the world outside takes shape. In a sense, then, seeing is an illusion, because there are no pictures inside our heads.
The light-absorbing portion of the pigment molecules in all photoreceptors is a compound called retinal, which is bound to a protein called an opsin. There are 4 types of opsins and thus 4 types of photoreceptors: rods and 3 types of cones. Retinal preferentially absorbs different wave lengths (colors) of the visible spectrum, depending on the type of opsin to which it is bound.
The rods, you may recall, allow us to see in dim light, but only in shades of gray. The pigment in rods, called rhodopsin, is packaged in membrane-bound disks, which are stacked like coins in the outer segment of the rod. When light strikes a rod, the retinal portion of rhodopsin changes the shape and splits from the protein portion, which is called scotopsin. The splitting of rhodopsin triggers events that reduce the permeability of the plasma membrane to sodium ions, eventually leading to changes in the activity of bipolar cells and ganglion cells. In the dark, rhodopsin is resynthesized. That is why, it is difficult to see when we first walk into a dark room from a brightly lit area because the rhodopsin has been split. As rhodopsin is resynthesized, vision becomes sharper.