There is a range of evidence to suggest that our brain processes self-generated visual information in much the same way that we process visual information from the environment.
There is a really great review article by Kosslyn, Ganis, and Thompson (2001) that goes over evidence for activity in modality-specific brain areas during visual, auditory, and motor visualization. One interesting effect is that damage to areas of the brain that process object properties yields the inability to visualize shape, and damage to areas of the brain that process spatial properties yields the inability to visualize location in space. Similar deficits have been observed in imagery deficits for color and faces following specific types of brain damage.
One question that is still debated is whether the very early visual processing areas (V1, Brodmann areas 17 and 18) are involved in visual imagery. These are areas that receive input from the eyes, provide the first cortical processing of light properties, and have a spatial layout similar to the retina. From the review, 34/50 neuroimaging studies have shown evidence of activity in the early visual cortex during visualization. More evidence has emerged since the Kosslyn review supporting the role of early visual areas during mental imagery (e.g. Slotnick et al., 2005).
Because early visual areas are thought to be active during self-generated imagery, it sets the stage for being able to "read out" what you are visualizing. Horikawa et al. (2013) trained a set of machine learning classifiers on awake subjects, and were then able to create crude reconstructions of what the subjects were visualizing while they were dreaming. No joke!
- Horikawa T, Tamaki M, Miyawaki Y, Kamitani T. (2103) Neural decoding of visual imagery during sleep. Science, 340(6132), 639-642.
- Kosslyn SM, Ganis G, and Thomson WL. (2001) Neural foundations of imagery. Nature Reviews Neuroscience, 2, 635-642.
- Sotnick SD, Thompson WL, and Kosslyn SM. (2005) Visual mental imagery induces retinotopically organized activation of early visual areas. Cerebral Cortex, 15(10), 1570-1583.