Gents,
Sorry to disagree with just about everyone here, but this is, in my view, the simplest way to wire a loft light - I always try to avoid using junction boxes - it's another weak link in the system:
SWITCH THE JUICE OFF FIRST.
DO NOT ATTEMPT THIS UNLESS YOU UNDERSTAND AND FEEL CONFIDENT TO DO IT.
1) Check that your ceiling roses are wired with the 3-plate method - Have a look in them, you should see three sets of terminals (plus an earth terminal) - Each ceiling rose will have two or three cables going to it - if you only have one, this method will not work. The middle terminals should have red wires, the two outer ones (which feed the light itself) should have a black in each, one of which should have red sleeving on, (but this is often missing). These two outer terminals sets should also have the pendant connected to them.
2) Take a 1mm T+E cable from a ceiling rose to a switch box fixed to a joist in the loft. You will find that most or all of the roses will have three wires in, but the last light on the circuit should only have two - you will find it easier to wire it from this one if you can find it.
3) From this switch box, wire another 1mm T+E cable to the light fitting in the loft, and connect the light fitting to this.
4) In the switch box, connect the incoming and outgoing earths together to the earth terminal in the switch box, or if there is not one, into a 5 or 15A insulated connector block (don't forget to put green/yellow sleeving on the earth wires).
5) Connect both of the Neutrals together in the switch box into a 5A or 15A connector block.
6) Connect the incoming live (from cieling rose) to the 'C' connection on the switch.
7) Connect the outgoing live to the L1 connection on the switch (you may need to swaop this to the L2 if switch appears upside down when you have finished).
8) MAKE SURE THE SUPPLY IS ISOLATED. In the cieling rose, connect the earth to the earth terminal with the others. The live goes into the live terminal block - these are usually the centre terminals, with either two or three reds in. Th Neutral goes into the Neutral terminal block - it should be one of the side terminal blocks, marked N and have a black wire in, and the blue pendant flex. Do not connect it into the one with the black wire that is sleeved red, and also has the brown pendant flex in. This is switched live.
The only thing to be wary of is that sometimes, sparks don't put red sleeving on the switched live in the rose, so it's not always clear which is switched live and which is neutral. If you want to check, get a neon screwdriver, switch the light on, and the switched live will light the neon, the neutral won't. If you get this wrong, the loft light won't work properly unless the light you have fed it from is on! You may also find when you turn the loft light on, the light you fed it from will come on dimly. If this happens, swap the neutral you put into the rose to the other side, with the other black wire.
Hope this helps, please be careful..
Paul