The sonar light is indeed a strange one. The only reference to it outside of the DAT files is the associated AlertLight entry in each respective SIM file, and that entry only covers whether it flickers and what color it is. My guess it that it's something hard-coded.
I wonder whether that light was even meant to pick up on a sound contact, since the picture in the Sonar Operator's manual describes the left-hand light on the stack as one that indicates whether the projector shaft was lowered, not to mention it was red in color:
In-game we man the the port side projector, and I've never seen a diagram showing what the lights at the top on that side there indicated. My guess is that the controls for the port side were duplicated in whole from the starboard side, meaning the light that we see at the sonar display should be solid red and never change color.