The joke is a pun. Optical scientists experiment with the way light reflects and is percieved by the eye.  A prism is an object that reflects light or splits it into the spectrum of the rainbow.  'Prism' sounds like 'prison'.
The optical scientist who stole his colleague ' s bifocals was sentenced to three years in a state prism .