Why can the $W^{+/-}$ particles change quarks of different generations, while the $Z^0$ only changes leptons of one generation? A $W^{+/-}$ particle can change a quark from one generation into a quark of a different generation, as long as these quarks (obviously) differ 1 or -1 in electric charge. So an up quark ($+\frac 2 3$) can be changed in a strange quark ($-\frac 1 3$) by means of a $W^-$ vector boson.
But why can't (for example) a $Z^0$ change a muon in an electron neutrino. I think conservation of lepton number offers no answer because is a rule which follows from experiment. Conservation of baryon number is also a conservation rule, but nevertheless, the decay of the proton is believed to be possible. So maybe it will also be possible to change a muon in an electron neutrino (or a muon in an electron).
 A: The standard model summarizes the fact you are stating as 

At tree level, there are no flavor-changing neutral currents.

The reason is trivial, but slightly technical. The fermion flavor linear combinations the gauge bosons couple to are not the mass (yukawa flavor) eigenstates. One diagonalizes through Unitary mixing matrices the up-like and down-like quark (and lepton) triplets separately, and inserts these rotated triplets into all gauge boson vertices. 
The respective unitary matrix for the W couplings, consisting of the product of the up (hermitian transposed) and down unitary matrices, yield an off-diagonal unitary matrix, the CKM one (so, then, generation changing). 
The analog matrices at the Z vertex, however, are the products of the up-diagonalizing matrix with its own hermitian conjugate, so inverse; and, respectively that of the down-diagonalizing matrix with its inverse. They are thus both the identity: diagonal. They are gone. The neutral currents couple to mass/flavor eigenstates.
So neutral couplings do not change flavor.  Vanishing charge flow  blesses fermions  with diagonal couplings. 
One should leave lepton numbers out of it.
Loop corrections are another matter, but they are subdominant.
