All consumer-grade audio gear uses the Sony/Philips Digital Interface Format (S/PDIF). There are a few connection methods on which S/PDIF can be transmitted.
The normal digital audio optical link manufactures use is called "Toslink" (generically, EIAJ optical). The "Tos" comes from Toshiba, they designed the transmitters and receivers. They do not have spectacular bandwidth or speed. Inside the player or dac, they are pretty much connected to the same lines a coaxial in/out would be connected to, therefore you're undergoing an unnecessary media conversion from electrical to optical and back to electrical. All this can effect signal timing. Bits may be bits, but they have to arrive at the digital receiver in the right order at the right time. When they don't, you get what's called jitter. In practice, there is ALWAYS digital jitter, even in one-box CD players. However, the S/PDIF interface makes things worse, as the digital audio signal and clock information (which tells the DACs when to decode a bit of the datastream they are receiving) have to travel along the same conductor. S/PDIF uses biphase mark encoding to achieve this, however it is highly sensitive to phase distortion.
From what I can gather so far, 75Ω BNC --> 75Ω BNC is the ideal S/PDIF transmission line, with AES/EBU 110Ω XLR being second, RCA --> RCA coaxial third (the RCA connector is not ideal for such high bandwidth applications as S/PDIF), and Toslink being a distant fourth.
There's another one in the mix too - ST optical. Generally used in telecommunications and networking, ST transmitters and receivers have extremely high bandwidth and speed, and work very well for transmitting S/PDIF. Some say it's the best. For me, the jury is still out. It is certainly a different flavour. I don't like that it's an extra media conversion, but it seems more resolving than all the AES/EBU cables I have tried.
To answer the original question, all Toslink transmitters are essentially identical, but what's hooked up to them certainly isn't. Same case with any other S/PDIF transmission medium, the digital output circuitry of the transport is very important.
Generally speaking, a cheap CD player with a Toslink output will sound better through an external DAC. However, the same external DAC will sound better with a well engineered and implemented transport.