Black is hot (from the circuit breaker or fuse)
White is neutral, i.e, no voltage to ground but it carries current that could zap you if you got in series with it (not hard to do).
Green is earth ground; supposed to be no voltage or current, just a safety wire.
If you will wire black to the switch and to the light, the next person who comes behind you will know what to expect.
If you keep your white wire as solid as possible, i.e, few splices, you will reduce the hazard of getting in series with it.
In your example of wiring the switch through the white wire, the whole appliance and half the switch is energized relatve to ground with the switch off; a person in contact with the ground could get electrocuted while changing the light bulb.
Disclaimer: Electrical work should be performed only by a licensed electrician following local codes.