If you need to put a screw in sunglasses or eyeglasses, dab the screw with clear nail polish to keep it in place. The nail polish keeps it in place as it gets in all the cracks and spaces.
This page contains the following solutions.
If you find the screws on your sunglasses always go loose then once you have tightened them up, apply a tiny dot of clear nail polish over the screw, let dry and walla!