How can I install a motion sensor for a closet light?
You didn't say if you already had lighting in your closet or not.  If you don't, I would suggest buying a stick-up (battery-operated) LED light with a motion sensor.  (In my area, most retailers have several models like this.)

Most interior motion sensors are combined with a switch, so if you don't want a switch then you may be out of luck.