Its not as scary as it seems having all those cables so lets break it down,
1 cable will be coming from your switch and it sounds like 2 cables will be supply in and supply out and the 4th should be a feed to another light on the same switch, the problem you have is identifying them if you have disconnected them all, as 4 the cable with just live and earth it sounds a bit suspect perhaps a d.i.yer has previously been having a go at your wiring.
You will need a continuity meter to check which cable is which.
DIY how to tutorial projects and guides - Did you know we have a DIY Projects section? Well, if no, then we certainly do! Within this area of our site have literally hundreds of how-to guides and tutorials that cover a huge range of home improvement tasks. Each page also comes with pictures and a video to make completing those jobs even easier!