Balanced (TRS) 1/4" cables are the best for that. Some components require using unbalanced, but not many. In some instances, using a TRS 1/4" cable in an unbalanced input/output won't work - like an insert jack from a mixer (TRS) going to an unbalanced input in an effect box. TRS uses 3 wires (Tip/Ring/Sleeve - it's essentially an XLR cable in a 1/4" form), and using it as an insert cable means that one wire is send, one wire is return, and the third is ground. If eveything doesn't line up, it won't work. But when it's balanced to balanced, it gives you higher quality signal.
Generally, the devices you're using will tell you by the jack which type of connection it is.
Avoid using speaker cables for anything other than speakers. They're designed for much higher voltages than what mixers/rack equipment will put out.