If that button is only linked to a joystick button or controller button then it won't work.
It needs a (secondary) keyboard binding.
This is what my binding file looks like :
<NightVisionToggle>
<Primary Device="Keyboard" Key="Key_N" />
<Secondary Device="{NoDevice}" Key="" />
</NightVisionToggle>
If I press the stream deck button, then I see the night vision in the right panel toggle :
I am currently docked at a station and the button state image doesn't change.
Perhaps that is normal in a situation where night vision is not functional in the game (e.g. docked)..
I will verify later today, when I am not at work.