Need help on how to approch 12v digital read on a blinking signal

Yes, grounds must be connected to provide a common reference point between systems.

Grounds can be separated if using the optoisolator, light does not need a common reference.