It is very likely a loose connection in a ceiling rose.
Lights are connected in a daisy chain; the supply goes to one rose, then continues on to the next.
If you can work out which route the circuit takes, the bad connection is most likely either in the last ceiling rose that works, or in the first one that doesn't
Have you got a multimeter? If not, splash out £10 in your local hardware store.
Do not take out any wires from any lighting terminal unless you have made a careful sketch of which wire goes where - not just "red here, black here - but which of them. there will usually be at least three cables in each rose, and each cable will contain at least three wires. Mark the cable sheath and individual cores if necessary.
Do not connect or disconnect anything from more than one fitting at a time, until you have proved that your first fitting is correct.
An alternative cause is cable damage, e.g. from mice gnawing them or someone driving a screw or nail into a floor or wall.
Turn of the circuit before starting work, and check that ther terminals are dead before touching them with anything except a multimeter. A neon screwdriver will not do.
Look at the lighting circuit info and diagrams at the top of the "Electrics - UK" forum "read first"