As I understand it, it depends on how well the optical output is implemented. I have swapped between coax and optical on a few cd players and the results varied from indistinguishable to not as good from the optical. Although the differences were slight enough that I suspect I would have trouble spotting them if I did not know which connection I was using.
My perception was that the optical could sound a little lighter and sweeter whilst at the same time lacking some impact, most notable as 'soft' bass. But as I say, a slight difference, on the edge of perception.
An optical cable can be too long for the signal to pass down it without problems, again depends on how good the optical output is.
So in short results will vary from case to case.
Current Lash Up:
TEAC VRDS 701T > Sony TAE1000ESD > Krell KSA50S > JM Labs Focal Electra 926.