Your wiring "should" all be labeled under you dash. Trace the wire back into the dash and see if you can find the label. If it was added by an individual it may not be labeled.
If it's got a Detroit in it it's probably the override switch to get it off the road when the computer shuts it down. If it's got a cummins it's the switch to get flash codes out of the ECM.