What size wire should I use to add an outlet to a light circuit?
Check the Breaker
If the circuit breaker or fuse is rated 15A, then you can use 14 AWG (or larger) wire. If the circuit breaker or fuse is rated 20A then you can use 12 AWG (or larger) wire.
If the existing wire is 14 AWG but the circuit breaker or fuse is 20A then you have a problem and the circuit needs to changed to 15A or the wire replaced with 12 AWG.
Wiring
There are a couple of ways to do this. The simplest is to connect the existing wire, in a junction box, to an outlet (either in that junction box or run a cable to a new junction box in a preferred location) and then run another cable (either pigtailed to the first one or off the second set of screws on the outlet) to the switch and light.
I don't know if GFCI is required for the receptacles. If it is, I would recommend pigtailing rather than using the load screws as that will avoid (a) confusion about line vs. load, which seems to cause problems for a lot of people and (b) avoid a GFCI trip from turning out the only light in the attic.