GM calls that box a Vehicle Speed Signal Buffer (VSSB). The black plastic piece screwed into the back of the speed head is an optical sensor. The VSSB amplifies the optical sensor signal to a level that the Cruise III cruise control module and Early TBI can interpret.
Specifically how it works is...
A reflective blade and optical pickup mount is integrated into all GM CK & RV Light Truck speedometer heads starting in 1981 and ending in 1989 or 1990.
The reflective blade in the speedometer rotates, when the speedo cable turns, with its blades passing through a light beam from an LED in the optical sensor head.
When the rotating reflective blade enters the LED light beam light is reflected back to a photocell in the optic head.
The photocell in the sensor emits a raw low level speed signal to be sent to the VSSB for amplification and signal conditioning.
This amplified and conditioned signal is then sent to the buffer output terminals for the TBI ECM and Cruise III Module.
I believe it's a 2,000 pulse per mile signal.
If you don't have cruise control... I'd just tie it out of the way when you install the cluster. It won't hurt anything.