The lock light in the system panel shows whether a valid clock source is found on the digital input. There are 3 different colours that the lock light can be under the Preferred Clock Source menu:
Red
A red lock light means that there is nothing connected to the digital input. If you plug a piece of equipment in and it stays red where you expect it to go green then you should double check that the external unit is turned on and that the optical cable is outputting a red glow from the end of it (showing that there is some signal present).
Amber
An amber lock light means that there is a clock source on the digital input, but that it isn't valid and doesn't match up with the DAW. This can occur if for example that you have a ProTools session at 48kHz, but your external mic preamp is set to 44.1kHz. This would still allow audio through into your DAW however it would be full of clicks and pops and would be unusable. If you are getting pops and clicks then the first thing to do is check for the amber light.
Green
You have a valid clock source and just need to make sure that if you select optical instead of internal if you want to use it.
If you are having issues making the Lock Light go green from red or amber then please go through the digital input setup