Labour ministers vow to introduce new legal requirements to ensure communities benefit from upgrades to National Grid infrastructure.