If you are using single coil pickups such as Strats or Telecasters, it is easy to add extra rubber surgical tubing between the pickguard and the pickup cover. Many times the old rubber tubing becomes compressed and dried out. It is easy to repair and will solve your problem. The tubing you want is 1/4" O.D. (outside diameter) and 1/8' I.D. (inside diameter) amber surgical rubber tubing. You can cut it to the length you need. It will slide over the pickup adjustment screw. If you can't find it contact me and I will help you get it.
If you have the same problem with Humbuckers you can simply take the spring you are using and gently stretch it, making it longer. This will give you slightly more compression and hold the pickup tighter.