Electrical wiring ages along with your home. Wires sticking out of electrical outlets pose a fire risk and not just for older houses. There are a few reasons this happens, including loss of the tape adhesive holding the wires down, loss of the connection or unnecessary wires.
Taping the wires is only a temporary fix to the situation and does not reduce fire risk. Instead, spend your efforts on tightly securing the wires already there or rewiring with the help of a professional electrician. Properly secured live wires help prevent fires from starting around outlets, especially those that are combustible. It is a good idea to turn off the circuit breaker for the room before working on anything electrical in the room including fixing the outlet wires.