Before electricity, light below a vessel's deck was provided by candles, oil and kerosene lamps—all dangerous aboard a wooden ship.
In normal usage, the prism hangs below the overhead and disperses the light sideways; the top is flat and installed flush with the deck, becoming part of the deck.
(A plain flat glass window would just form a single bright spot below—not very useful for general illumination—hence the prismatic shape.)
To maximize light output, the glass used was originally made colorless with the addition of manganese dioxide; the purple hue of some specimens is caused by decades of exposure to UV.
[4] Aboard colliers (coal ships), prisms were also used to keep check on the cargo hold: light from a fire would be collected by the prism and be made visible on the deck even in daylight.