The nerve that carries visual information from the retina to the brain is the optic nerve (cranial nerve II).