The light sensor detects light and sends it to the red board as a value which is just an electrical signal, the red board then interprets that signal as a digital value and converts it to information a computer can read.

An analog output takes a voltage and converts it to a voltage level that can be interpreted by other analog devices.

A digital outworks opposite to an analog one. It takes a value and interprets that value as a value of meaning.