Z0, You can't derive it, of course, since it's a theory, but you can explain how we were led to it, and why it seems reasonable. W+ and W- always couple to particles in pairs: e and νe, μ and νμ, u quark and d quark. It's as if the particles formed doublets in a symmetry group, which was called weak isospin. The W+ and W- acted like stepping operators of an SU(2) group, but the third component W0 was missing.
Neutral weak currents were discovered in 1973 in processes such as neutrino-electron scattering. The first idea was that they were mediated by the missing W0. However things did not fit. Although the charged weak currents are known to be purely left-handed, the neutral current was found to be predominantly left-handed with a smaller right-handed component. So it did not simply fit into a triplet. But, if you had a triplet W plus something else there would be a fourth degree of freedom.
Weinberg's idea was that the fourth degree of freedom was electromagnetism. If so, it's clear how electromagnetism must fit in. Particles in each weak multiplet differ in charge by one. Also the average charges of the multiplets are displaced. By analogy with the strong interactions, we describe this by introducing a weak hypercharge Y and the formula Q = J3 + Y/2. Thus eL- and ve form a doublet with total charge -1 (hence Y = -1) while eR- forms a singlet with total charge -1, hence Y = -2.
Weinberg said the B and the W0 were mixed into two orthogonal states Aμ = Bμ cos θW + Wμ3 sin θW and Zμ = -Bμ sin θW + Wμ3 cos θW where θW is a weak mixing angle.
Ok, here's the key point. When you write out the electroweak neutral current interaction in terms of these rotated states,
g Jμ3 Wμ3 + ½ g' JμY Bμ = (g sin θW Jμ3 + ½ g' cos θW JμY) Aμ + (...) Zμ
the coefficient of Aμ must be the electromagnetic current JμEM = e(Jμ3 + 1/2 JμY). (This implies g sin θW = g' cos θW = e.)
The field Zμ is simply whatever is orthogonal to that. It turns out to be JμNC = Jμ3 - sin2 JμEM