Which is better depends on the source. Theoretically, an optical cable should sound better, as their is no impedance mismatch, electrical interference, or ground loops. Both components are electrically isolated from each other.
However, there are some pretty poor optical cables out there that induce jitter on their own through poorly fitting/designed connectors, poor materials, etc.
All things being equal, I'd say a good glass toslink cable would introduce the least amount of it's own sonic signature. I bought a $25 glass cable - Sonicwave - that works great for me. Not sure about their availability outside of the US. People have had very good results with the van den Hul and Wireworld optical cables.
In optical cables, glass easily beats anything else.
There was a review/shoot out in 6Moons a while back. Google search 6Moons toslink?
My advice is to get a few of each type and see which works best. Get a return policy from the dealer or buy second hand.