No doubt, it is the captain - but of course consider the circumstances.
In an emergency, or a condition that could lead to an emergency, definitely the captain decides.
But in other circumstanes, let the company decide.
xxx
Examples -
Engine failure after V1, continuing the takeoff (in a twin engine aircraft) you come back to airport.
Or to an approved alternate (FAA says within 60 minutes of single engine cruise).
If you fly a 3 or 4 engines aircraft, company might have other ideas. Captain has final decision.
With PanAm, as an example, LAX to LHR with a 747, company could have decided to go to JFK.
Then a spare airplane would have taken passengers to LHR.
Unlike a Speedbird deciding to continue on 3 engines out of SFO to LHR...!
xxx
Safety consideration come first, then $$$/currency you use.
Dumping tons of fuel in the ocean makes seafood taste bad in your dish.
xxx
Destination alternates (below visibility minimums) are often up to company.
Coming from South America to MAD below minimums, you better go to BCN.
Better connections (air or ground) for passengers.
If not, consider landing in LPA and... wait until weather gets better.
Again, captain decides with company's agreement and suggestions.
xxx
I remember flying to JFK many times, marginal weather, EWR was alternate, with PHL or BOS available.
Well, the idiots decided for EWR, also going below minimums, same as JFK.
My "real alternate" for JFK was ALWAYS Newburg, NY. Always was clear when JFK/EWR went down.
The problem was US Customs/Immigration. Plan to keep pax aboard for 2-3 hours.
Made the Greyhound buses happy to bring the people back to JFK.
Apparently, Greyhound monitored ATIS with buses ready to fetch passengers around.
For LAX, ONT was best, but consider LGB or PMD.
xxx
There are so many scenarios to consider.
So yes, captains decide, but in many circumstances, unless dire emergency, let the guys on ground decide.
For you guys in UK, you got enough airports to handle a 737 size plane. Plenty of runways in Europe as well.
xxx

Happy contrails