Turn off the power for the circuit you are working on at the home's electrical distribution box. Confirm the power is off by trying to activate the light and also by plugging a working lamp into the outlet. Double check the power is off by touching a non-contact voltage detector to the outlet's narrow slot.
Remove the screws that fasten the cover on the outlet and pull the cover off.
Tighten the top and bottom screws that fasten the outlet and switch to the box. If one of these mounts is bent back, pry it forward using a screwdriver for leverage.
Reinstall the electrical cover, reversing the process used to remove it. Turn the power back on at the distribution panel.