A loose outlet or switch that wiggles in the wall is a safety issue and should be fixed promptly. The fix takes five minutes and costs nothing.
Go to the breaker panel and turn off the circuit for the outlet or switch. Confirm it's off. Remove the single center screw and take off the cover plate.
You'll see two screws — one at the top and one at the bottom — securing the outlet or switch to the electrical box. Tighten both firmly.
If the outlet sits too far back even after tightening, add plastic outlet spacers behind the mounting screws. Reinstall the cover and restore power.
Always turn off the breaker before working on any outlet or switch — even for a simple tightening job.