Is the launch from the ESA spaceport because of agreement or an orbital insertion advantage from that facility?
The Ariane 5 launch vehicle and all the work associated with the launch is ESA's contribution to the JWST project. In return, ESA gets at least 15% observation time:
ESA's participation in the JWST mission was formally approved by the ESA Science Programme Committee in 2003. The four major European contributions to the mission are formalised in the Memorandum of Understanding on JWST signed by NASA and ESA in 2007. These contributions are:
- provision of the NIRSpec instrument;
- provision of the Optical System of the MIRI instrument through special funding from the ESA Member States;
- provision of the Ariane 5 launcher and all launch services;
- provision of staff to support mission operations.
In return for the European contributions, ESA gains full partnership in JWST and secures full access to the observatory for astronomers from ESA Member States, on identical terms to those of today on HST. European scientists will be represented on all advisory bodies of the project and will be able to win observing time on JWST through a peer review process, with an expectation of a minimum ESA share of 15% of the total JWST observing time.
(emphasis mine; source: https://sci.esa.int/web/jwst/-/45728-europe-s-role)
It appears that the capabilities of Ariane 5 (with or without the added benefit of being closer to the equator) did not play a role in the decision, at least not initially: on page 17 of this presentation (direct link to 7.3 MB PDF) from 2003, the Atlas V was considered as launch vehicle, with "ample mass margin".
It turns out that there is only one currently operating rocket that has the width (5.4 meters), length, and the payload capacity (6200 kg to a C3 of ~ -0.75).
Atlas V 551 is very close, it has the fairing and is just a bit undercapacity, only being able to carry 6150 kg. Vulcan will be able to, I think Falcon Heavy modified with the larger fairing and vertical integration would likely work. Delta Heavy has too small of a payload fairing. Ariane 5 is really the only rocket that can do it, and that launches from French Guiana.
This is all in addition to the agreement that ESA had to be a part of the JWST development, and others. But it turns out the more fundamental reason is only Ariane can lift it today.