Wire sizes are specified based on the ampacity of the wire. The ampacity is the amount of amperes that can flow through a wire under the normal wire usages. The ampere, or amp for short, is a unit of measurement of the current that flows through a wire. The larger the wire is in diameter, the more amps it can handle. Wires are measured in AWG, or American Wire Gage. The sizes start with 24 AWG and go up to 1 AWG. Then the sizes change to 1/0, 2/0, 3/0, 4/0. The sizes 1/0 through 4/0 are pronounced 1 aught, 2 aught, etc. Then the wire sizes change to kcmil, starting with 250 kcmil, going up to 2000 kcmil.
Things You'll Need
 NEC Code 2011
 Calculator
 Ohm's Law: E = IR

Determine the current that will be used. Each wire size is rated to work best with a range of amps. No. 24 to No.14 wires are rated for low voltages and appliances that do not use more than 15 amps. Once the ampacity rating exceeds that, No.12 wires will be used. No.12 wire can be used with current flow that does not exceed 20 amps and is required to be used with 20amp circuits. If No.14 is used instead of No.12, the circuit will trip very often and the wire might burn.

Calculate the voltage drop. In many applications, a wire size can seem to handle the needed current, but there may be a voltage drop so that the voltage reaching the appliances is not enough. Every wire has its own specific resistance calculation. Voltage drop can cause an appliance, for example, an air conditioner, to work for a while, stop, then work again, then stop for unknown reasons.

Calculate the distance between the source and the appliance. The distance factor is very important. The more wire that is used, the more resistance that is added to the circuit. If the distance is more than 150 feet, go one size larger. For example No.10 wire can handle 30 amps comfortably, but when the distance the current has to travel is more than 150 feet we need to use No.8. The No.8 copper wire can handle 50 amps very easily. Again, if the distance is longer we need to go up to No.6 wire. The less the wire number, the bigger the diameter. For example, No.6 wire is larger than No.8 wires.

Specify the wire usage based on the National Electrical Code of 2011. There is a whole chapter with tables (chapter 9) for every wire out there, its ampacity, resistance, when to be used, and special conditions applied for each kind. Besides specifying wire size, other factors play an important role in an electric circuit.
References
 "NEC Code"; NFPA 70; 2011
 "Insulating Materials: Principles, Materials, Applications"; Margit Pfundstein; 2008
 "Electrical Wiring, Residential"; Ray C. Mullin; 2001
 Csgnetwork.com: Wire Size Calculator
 Photo Credit Creatas/Creatas/Getty Images