The requirement to give the tenant information about how the deposit is being protected is covered by section 213(6) of the Housing Act 2004, and linked to section 21 notices by section 215(2).
For the other documents, the relevant legislation is The Assured Shorthold Tenancy Notices and Prescribed Requirements (England) Regulations 2015, which came into force for new tenancies on 1st October 2015.
In particular, regulation 2 requires the landlord to give the tenant an energy performance certificate and a gas safety certificate, while regulation 3 requires the landlord to give the tenant a copy (which may be on paper or by e-mail) of the official "How to rent" booklet.
The power to make these regulations comes from sections 21A and 21B of the Housing Act 1988, and it is there that these rules are linked to the serving of a section 21 eviction notice. (These sections were inserted into the Act by the Deregulation Act 2015.)
Note that the requirement to give the tenant an electrical safety report is not linked to section 21. It is simply a legal requirement, and a fine can be imposed if the rule is breached.
(For completeness: this comes from regulation 3 of the The Electrical Safety Standards in the Private Rented Sector (England) Regulations 2020. The regulations came into force on the 1st June 2020, though for existing tenancies the deadline for electrical inspections was 1st April 2021.)
See also Shelter's comprehensive list of all the things that can make a section 21 notice invalid.