The DM must rule on who makes the attack roll
RAW, it is not clear who makes the roll
When BG:DiA introduces Infernal War Machines, it says (216):
Infernal war machines are made of infernal iron and bristle with spikes, blades, chains, and siege weapons.
Thus we know that the weaponry of the war machines are siege weapons, and the general rules for siege weapons are found in the DMG. Comparing the description of the weapon attacks themselves, in the DMG a ballista bolt is described as:
Bolt. Ranged Weapon Attack: +6 to hit, range 120/480 ft., one target. Hit: 16 (3dl0) piercing damage.
While a similar weapon, the harpoon of a tormentor is described in BG:DiA as:
Harpoon Flinger (Requires 1 Crew and Grants Half Cover). Ammunition:
10 harpoons. Ranged Weapon Attack: +7 to hit, range 120 ft., one target. Hit: 11 (2d8 + 2) piercing damage.
The nature of the attack roll itself is the same between the two, and in neither case do the rules specify who is making that attack roll, the engine or the crew member.
According to the rules for Siege Equipment (DMG 255-256), siege weapons:
require creatures to move them, as well as to load, aim, and fire them.
Further, each weapon specifies whose action is involved in firing it. In the case of the ballista, for example:
It takes one action to load the weapon, one action to aim it,
and one action to fire it.
These rules provide the to-hit bonus for the weapon, but crucially, they do not say who makes this attack roll, the weapon itself or some member of its crew.
The war machines similarly require actions to use (BG:DiA 216):
A creature can use an action of the station it's occupying. Once a creature uses a station's action, that action can't be used again until the start of that creature's next turn. Only one creature can occupy each station.
Thus while the action of a creature is clearly required to fire such a weapon, it is not explicit whether it is the creature or the weapon itself that makes the roll.
Neither do the shipboard weapons in the Astral Adventurer's Guide say who is making the attack roll.
Context clues strongly suggest that it is the weapon, not the operator, making the roll.
The shipboard weapons in the Ghosts of Saltmarsh rules do say that it is the ship itself making the rolls, not the crew.
For example, in the stat block of a galley, we find (emphases mine):
On its turn, the galley can take 3 actions, choosing from the options below. It can take only 2 actions if it has fewer than forty crew and only 1 action if it has fewer than twenty...The galley can fire its ballistas...The galley can fire its mangonels.
Further, ship officers have the Take Aim action, which says (emphasis mine):
As an action, the captain, first mate, or bosun directs the crew’s firing, aiding in aiming one of the ship’s weapons. Select one of the ship’s weapons that is within 10 feet of the officer. It [the ship's weapon] gains advantage on the next attack roll it makes before the end of the ship’s next turn.
Thus, if you are using the GoSM rules, or are applying these rules to other instances of siege weapons, it is the weapon (or ship or vehicle) itself that is making the roll.
Within the section of BG:DiA on infernal war machines, the stat blocks listed have a static attack bonus, even though their operators will have different Dexterities. The adventure as written allows PCs to encounter harpoon flingers being crewed by creatures with Dex mods of +3 (barbed devils (91)), +2 (wererats (87), ghouls (91), or bearded devils (91)), +1 (hobgoblins (90), or 0 (mezzoloths (91)). Despite the range of four points in the Dexterity modifiers of the crew, we are not instructed to take these modifiers into account, but rather to simply use the stats given for that type of war machine. Of course, the PCs may obtain war machines themselves, giving an even greater range to the Dexterities of potential operators, and no specific instructions are given for this event.
The explicit directions in GoS and the implicit context in BG:DiA suggest strongly that it is not the crewmember who makes the attack roll for an infernal war machine weapon. Given that, there are relatively few abilities that are going to be able to impact this roll. Your suggestion of a ranger's archery Fighting Style, for example, says:
You gain a +2 bonus to attack rolls you make with ranged weapons.
Because this bonus is applied to attack rolls "you make", it would not count for a ranger crewing a harpoon flinger, and most abilities use similar language.
'Attack rolls against'
Even though most abilities that affect attack rolls apply to the attacker and are restricted to creatures making the attack (and not weapons or vehicles), there are a whole class of things that affect attack rolls because of their effect on the target.
Many of these are called Conditions. The Blinded condition, for example, says:
Attack rolls against the creature have advantage, and the creature's attack rolls have disadvantage.
Note that this affects all attack rolls, and not just attack rolls made by a creature. Thus even if it was the war machine, or the harpoon flinger itself making the attack, the attack roll would still have advantage if its target was Blinded. Similar language can be found in the descriptions of the Invisible, Paralyzed, Petrified, Prone, Restrained, Stunned, and Unconscious Conditions. Thus, if you are looking for "class abilities [that] would also impact harpoon flinger bonuses", then any class abilities by the weapon operator that imposed these Conditions on the target of the flinger would count.
Further, with spells and other class abilities, anything that affects "attacks against" rather than "attacks by" should also be included, and cf: avenging angel, distracting strike, and faerie fire.
Is the harpoon flinger an "ally"?
Xanathar's Guide to Everything includes a racial feat for Halflings called Bountiful Luck (pp. 73, 74):
When an ally you can see within 30 feet of you rolls a 1 on the d20 for an attack roll, an ability check, or a saving throw, you can use your reaction to let the ally reroll the die. The ally must use the new roll.
As written, a halfling with this Feat can use it on any "ally", not only an 'allied creature'. Since there is no game definition for what constitutes an ally, a DM might consider the flinger itself to be working toward a common goal with its halfling operator, and thus allow the halfling to grant a reroll on the attack roll, thereby making the flinger's attack more accurate.