How do you wire a new light switch with a ground wire when the old switch had no ground?
for USA, Canada and other countries running a 60 Hz supply service.
Always ask your local town's Building Standards office if a permit is required for this kind of work.
First thing to check carefully is this: do the wires already going to the light switch include a ground wire, and, if so, is it actually grounded?
If the answer is no then you can wire the switch as described in the manufacturer's instructions and just omit the ground wire step. This does not make the light switch any less safe than it was but it is not the preferred option. It can sometimes be done legally under the National Electrical Code (NEC) when using valid exceptions and/or any subsequent local jurisdictional approval.
If the answer is no and you want to add the ground, that is the preferred method of repair. You will need to pull new set of wires including a ground. If this is a single household fixture on a 15 amp breaker and you are replacing it with a 15/20 amp switch, use 14/2 romex and you should be good. If not get the advice of an electrician to help you.
As always, if you are in doubt about what to do, the best advice anyone should give you is to call a licensed electrician to advise what work is needed.
Before you do any work yourself,
on electrical circuits, equipment or appliances,
always use a test meter to ensure the circuit is, in fact, de-energized.
IF YOU ARE NOT ALREADY SURE YOU CAN DO THIS JOB
SAFELY AND COMPETENTLY
REFER THIS WORK TO QUALIFIED PROFESSIONALS.