Nearly everyone here has posited magnetostriction as the cause for the hum. This is most certainly the case for transformers which have large amounts of ferrous material put in laminated sheets to form the core, but is a doubtful explanation in the case of power lines. Power lines don't have nearly enough magnetic material to produce large enough deformation to give rise to a loud hum that a passer-by may notice. The more likely cause, especially that it is mentioned the hum is noticed particularly after the passage of a train, is the vortex-shedding.
Wind flow over the wire at a sufficiently high velocity, generates a series of vortices that are periodically shed forming the so-called von-Karman vortex street in the aft of the bluff body. Now this phenomenon maintains fantastic periodicity for a reasonable range of Reynolds numbers. This aeolian effect is called Conductor gallop for low frequencies and flutter for high frequencies, which corresponds to the "singing" of power lines.