If the wall switch is loose, sounds like a connection has failed behind too. Re-connect loose wire, check all others, and tighten switch to wall correctly. Obviously turn off mains before attempting anything electrical.
Jex, October 2008
Isolate the supply and change the switch for a new one, making sure the wires go in the same terminals they were in before, and that they are in tightly.
If you are in any doubt get a competent electrician to have a look.