HaxeFlixel 2 player game: make input code cleaner
Parametrizing the keys seems like the correct solution to me. The subclassing approach leads to code duplication and inflexibility. However, you should not do that by adding parameters to update() - in fact, you can't, because the function signature of an overriden method has to match. You would get a compiler error:

Field update overloads parent class with different or incomplete type
Different number of function arguments

Since it's 4 parameters that are closely related to each other, you might want to bundle them in a structure. By using the FlxG.keys.anyPressed() API, which takes an array of keys, we could in theory also allow multiple keys per input:
package;

import flixel.FlxG;
import flixel.FlxSprite;
import flixel.util.FlxColor;
import flixel.input.keyboard.FlxKey;

class Player extends FlxSprite
{
    var keys:PlayerKeys;

    public function new(x:Float, y:Float, keys:PlayerKeys)
    {
        super(x, y);
        makeGraphic(20, 100, FlxColor.WHITE);
    }

    override public function update(elapsed:Float):Void
    {
        if (FlxG.keys.anyPressed(keys.up)) { /* move up */ }
        if (FlxG.keys.anyPressed(keys.down)) { /* move down */ }
        if (FlxG.keys.anyPressed(keys.left)) { /* move left */ }
        if (FlxG.keys.anyPressed(keys.right)) { /* move right */ }

        super.update(elapsed);
    }
}

typedef PlayerKeys = {
    up:Array&lt;FlxKey&gt;,
    down:Array&lt;FlxKey&gt;,
    left:Array&lt;FlxKey&gt;,
    right:Array&lt;FlxKey&gt;
}

And to construct the player instances:
player1 = new Player(x, y, {up: [UP], down: [DOWN], left: [LEFT], right: [RIGHT]});
player2 = new Player(x, y, {up: [W], down: [S], left: [A], right: [D]});


There's two other issues with your code:

You update() your players manually in PlayState - Flixel already does that when you call super.update(), since you've add()ed the players to the state. This means the players end up being updated twice per frame.
You manually added variables for WindowWidth and WindowHeight, which are already available globally via FlxG.width and FlxG.height.