Why do we go blind for a few seconds after switching off the light?
Short answer
The eyes need to adapt to the low lighting condition after you switch off the lights, a process called dark adaptation.

Background
The process behind the reduced visual function when going from bright ambient light to low-lighting conditions is caused by a process called dark adaptation. The visual system works on a huge intensity scale. The only way to do that is by adapting to ambient lighting intensity. 

The sensitivity of our eye can be measured by determining the absolute intensity threshold, i.e., the minimum luminance of a stimulus to produce a visual sensation. This can be measured by placing a subject in a dark room, and increasing the luminance of the test spot until the subject reports its presence. 

Dark adaptation refers to how the eye recovers its sensitivity in the dark following exposure to bright light. The sensitivity of the visual system increases approximately 35 times after dark adaptation.  

Dark adaptation forms the basis of the Duplicity Theory which states that above a certain luminance level (about 0.03 cd/m2), the cone mechanism is involved in mediating vision, called photopic vision. Below this level, the rod mechanism comes into play providing scotopic (night) vision. The range where two mechanisms are working together is called the mesopic range, as there is not an abrupt transition between the two mechanism.

The dark adaptation curve shown below (Fig. 1) depicts this duplex nature of our visual system. The sensitivity of the rod pathway improves considerably after 5-10 minutes in the dark. Because after you switch off the light the rod system is still inactive, you are unable to perceive much. The reason why rods are inactive is because they are said to be photo bleached. Photo bleaching refers to the visual pigments in the rods and cones to become used up because of the high light intensities when the light was still on. The pigment needs to be regenerated and that takes time. 


Fig. 1. Dark adaptation curves of rods and cones. Source: Webvision

Reference
- Kolb et al (eds). Webvision. The organization of the retina and the visual system (2012)