When my house was wired there was a wire left in the attic for a light, which was not installed. I want to install an outlet, which will remain hot, then a switch and a light.
Can this be done and do what size wire do I need to use?
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.
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.
Not thinner than the wire already installed. I suggest you to connect the outlet directly to the wires coming from the wall and use 1,5mm^2 wire to connect the light switch and fixture.