It depends on the cruise line and the cabin. On NCL there are lights in the closets of mini-suites and suites. The trick is finding where the dang switch is. Often it is in the very back of the closet or inside on the side.
I am also trying to remember but there were other lines where I had lights inside the closet.
It's a good idea to ask your cabin steward if the closet has a light.