Many 3D printer enthusiasts may be for the first time diving into electronics tinkering. The electronics landscape is very different today than it was 30 years ago. Today we have micro-controllers and breakout boards and a lot of the harder design work is already done for you. But the fundamentals themselves have not changed.
Choosing the correct wire size for your 3D printer's motors, hotend, heat bed and sensors is very important. It is not always one size fits all.
Let's compare a wire to a water pipe for a moment. A water pipe carries a certain volume of water at a certain pressure. What if the pressure applied to the water in the pipe were higher than the pipe could carry? Well the pipe would burst, wouldn't it?
This isn't all too different with wires and electricity. Now a wire will not "burst" like a water pipe will. BUT, if you use a wire that is not able to handle the electric current that you are going to put through it, you end up with heat. In fact, a wire could get so hot that it melts if too much electric current is forced onto it. The result is a fire hazard. So you can see why choosing the correct wire size is important.
So, it is very important to look at the power ratings of your components, in particular how much current it will require, and then refer to the handy AWG (American Wire Gauge) chart for information on which wire gauge at minimum would be required for that component.
With 3D printers, the components requiring the most current will without a doubt be the hotend and the bed heater. How do we determine the wire size for these? Well, one pretty standard heater cartridge is the 12V 30W ceramic cartridge. The equation to determine the amount of current required will be P=VI (where P = power in watts, V = voltage and I = current). Since we know the wattage will be 30W and the voltage will be 12V, we can calculate current as I=P/V which give us I=30W/12V = 2.5A. So we can now take that 2.5A and look at the AWG (http://www.engineeringtoolbox.com/wire-gauges-d_419.html) and find out that we need a minimum wire size of about 20 to 24 gauge wire, depending on whether your wire is stranded (preferred) or solid.
Other components to be aware of are the motors and servos. Generally though, along with the sensors, they generally don't use as much current as the heating elements so usually they can use a smaller wire.
Finally, if you aren't sure, err on the side of caution and get wire a size bigger than is needed. Larger wire gauges will work just fine in place of smaller ones and reduce the risk of overheating.
Please see this fantastic YouTube video by Thomas Sanladerer which give a great rundown of wiring up a 3D printer.