Your sensor / switch device is designed to be mounted into an electrical box with permanent wiring.
Your light fixture with its attached cord (with three prong plug) is meant to be connected into an outlet that is itself mounted in an electrical box with permanent wiring. The lamp itself, when configured this way could be considered a temporary connection to the electrical system.
So you have two options to consider in order to wire up this setup. The first one involves installing the necessary electrical boxes and permanent house wiring such that the switch/sensor assembly is controlling the On/Off of an outlet near the lamp mounting location. Then plug the three prong cord from the lamp into the switched outlet.
The second approach involves converting the lamp to a permanent wired installation. (Note that not all lamp fixtures are suitable for this but many are). Like before install two electrical boxes for the switch/sensor and one at the site where the light will mount. Connect the boxes with permanent type wiring with the switched end of the wiring terminating at the electrical box at the lamp fixture location. The lamp fixture is modified to remove the three pronged cord assembly and replace that with pigtail wiring that attaches to the switched wires in the electrical box. Normally in this type installation the lamp fixture then mounts over the electrical box becoming its cover. It is also possible in some instances to pass the switched wires through a wire clamp at the fixture interface with the box electrical box such that the wire joining to the fixture wiring occurs inside the fixture itself. Once again suitable for some fixtures but maybe not all.
Which ever approach you use try to avoid installing by other means where you tap temporary wiring into the permanent wiring supply and then kludge together the switch and fixture wiring with it dangling around in an unsafe manner.