Install a motion sensor
Turn off the electrical breaker for the outdoor light. Remove the light bulb if necessary. Unscrew mounting bolts that hold the light to the existing electrical box.
Unfasten the wire nuts that connect the electrical wires to the light, noting how each wire is connected. Set the old light and mounting screws aside.
Mount a new electrical box 6 to 12 inches beside the existing electrical box, by fastening it to the wall with screws. Cut a length of 12/2 gauge wire, about 12 inches longer than the distance from box to box.
Strip off about 5 inches of the outside plastic shielding from both ends of the 12/2 gauge wire. Strip off about 3/4 inches of insulation from both the white and black wires, at both ends of the 12/2 wire.
Insert one end of the 12/2 wire into a slot in the rear of the new electrical box. Pull those stripped wires forward and dangle them out of the box. Insert the other end of the 12/2 wire into a slot in the rear of the old electrical box. Pull those wires forward and dangle them out of the box.
Connect the old light to the new wires in the new electrical box, with new yellow wire nuts, connecting the wires in the same way they were connected earlier. Screw the light to the new box, and fasten the light bulb.
Connect the motion detector wires to the light and to the source electricity as described in the motion detector installation manual, using wire nuts. (Each motion detector's wiring is different, so take care to follow the instructions.) Fasten the motion detector securely to the old box, using the screws that are supplied.
Fasten the 12/2 wire to the wall with wire staples. Turn on the circuit breaker.
Remove the old wall light switch (optional)
Turn off the breaker. Unscrew the cover to the light switch box. Remove the cover.
Unscrew the two screws holding the switch to the box. Pull the switch out and unscrew the wires from the switch.
Fasten both black electrical wires together with a wire nut. Fasten both white wires together with a wire nut. Fasten both copper wires together with a wire nut. (Some of these wires may already be fastened with wire nuts; if so, leave them as you find them.)
Press wires back into the electrical box. Cover the electrical box with a new face plate with no hole. Turn the breaker back on.