I want to replace a single pole wall switch that contols a closet light with a single pole pilot light switch. The pilot light is supposed to light when the closet light is on. The current wall switch is outside the closet. I looked in the switch box and there are two wires (ablack and a white) and a bare copper ground that are connected to the existing switch. The black and white wires are connected to two screws on the right side of the single pole switch. The new Leviton pilot light switch has a brass screw (top right), a black screw (bottom right), a silver screw (top left), and a green ground screw (bottom left). I know where the ground wire is connected. Question: How do I connect the black and white romex wires to the new pilot light switch so that the pilot is 'ON" when the switch is "ON"? There must be something simple that I am overlooking, but I can't figure this out. Help!
It appears the switch you've purchased requires a neutral and you do not have a neutral wire available at your switch (only the hot and the switched hot). You'll need to either run a line to the switch that includes a neutral, which is now a standard practice, or you need to find a switch that will work without a dedicated neutral. Finding the latter may be difficult as the versions with a dedicated neutral are fairly standard.
To wire this switch you will need a third wire (a return leg) from the light fixture. If you can run the third wire than the switch can be wired thusly: Black (hot) wire from the box attaches to the brass screw of the switch, White (neutral) wire from the box attaches to the silver colored screw on the switch, the third wire (which you will need to install) is the return leg and it attaches to the dark screw on the switch. This will have it so the pilot light is only lit when the other light is on.
Switches that feature a light which illuminates when the switch is "on" require a neutral conductor. There are switches which illuminate when the switch is "off" that do not require a neutral, this is because they trickle a small amount of current through the lighted switch component, through the actual switched load to the load's neutral conductor; the amount of current is so small that the load is not sufficiently energized as to cause it to operate (note: if the load were very small, such as a light bulb the size of the illuminated switch component, the load would operate, i.e. light up, while the switch was "off").