very simply
In heavy winds tighten it up to flatten the sail and improve downwind performance.In downwind situations, tighten it up to reduce the boom's tendency to kick up.In light winds slack it off to induce twist and thereby increase power.In waves slack it off a bit to increase power by inducing some twist.Purchase Don Guillette's book on sail trim because the vang is only 'one member of the band' when playing that 'trim the sails tune'!You will also need to learn to play the cunningham, outhaul, halyard, traveller, backstay and mainsheet in harmony with the vang.