Cables:
The main difference that I am aware of is the diameter of the cable. Most brake cables are 1.5 or 1.6mm in diameter. Most shift cables are 1.1 or 1.2mm, galvanized shifter cables are 1.3mm.
I'm sure that there is a lot of science behind the difference but I'll leave that to someone else.
One major difference in MTB vs road BRAKE cable is the different sizes and styles of head: road cables have mushroom like ends where as MTB brake cables have barrel like ends.
Shifter cable ends are the same. Although nowadays many cables come with both ends, one on each end, and you can cut off the one you're not using.
There are two basic types of cables; brake and shifter. Brake cables are thicker, typically 1.5/1.6mm in diameter. Brake cables come with a choice of three different heads - one for mountain/flat bar brake levers, one for Shimano road/drop bar brake levers (compatible with most non-Shimano levers), and one for Campagnolo road/drop bar brake levers. A Shimano cable head is slightly larger than a Campy head so it may not fit into a Campy road brake.
A. Shimano Brake Cable
B. Campagnolo Brake Cable
C. MountainBrake Cable
D. Shimano Shifter Cable
E. Campagnolo Shifter Cable
Derailleur cables are thinner, 1.1/1.2mm in diameter. There are two
heads available on derailleur cables - Shimano and Campagnolo. A
Shimano cable head is slightly larger than a Campy head so it may not
fit into a Campy shifter.
From Bikeman
Housing:
Just like with cables, housing comes in two different types: brake and shifter. From the outside they may look the same - but they are in fact very different.
Brake housing is built around a wire that coils down the length of the cable. This structure gives the great strength needed for the power generated by the brake lever.
Shifter cables see different forces so the housing is built differently. Shifter housing is built around many length-wise running cables that make the housing 'compressionless' which aids in the crisp feel of shifting - especially needed on today's 8/9/10/11 speed cassettes.
Shifter housing also comes in two different outside diameters, 4mm and 5mm. New bikes and shifter sets typically come with 4mm housing. Most 4mm housing will have plastic ferrules at the ends while 5mm housing uses metal ferrules. Here at Bikeman we recommend using 5mm shift housing.
Other variations of housing include housing made from many aluminum segments, like Nokon housing. On the positive side the aluminum housing is stiff, lightweight, and reusable. On the negative side there is a lot more set up time, cost, and care must be taken to be sure that the frame is protected as aluminum housing will rub paint off where it contacts the frame.
Please Note: Due to their construction, brake housing should always be used with brakes and shifter housing should always be used with shifters. Shifter housing could fail if used on a brake (not good when you want to stop), brake housing could make that shifter feel a little dead.