It is well known that income taxes are distorting in a way that is not welfare improving, as it discourages labor supply. But as we need government revenue to finance public goods and there is support for some redistribution, we have to live with income tax. Of course, one can discuss whether it would be better to crank up sin taxes to provide revenue and provide lump-sum subsidies (or taxes) to provide for redistribution, but let us suppose we have only labor income tax available. Then it is obvious that tax rates need to be differentiated by labor supply elasticity. That is difficult to elicit from individuals, but there are some individual characteristics that can help here.
Let us focus on gender and marital status. Women have a higher labor supply elasticity, especially when married. One has therefore to be careful not to tax them too much, or they drop out of the labor force. The same applies to a much lesser degree to married men. Gender is mostly unalterable, thus it should be easy to tax by gender, but politics get in the way. It is easier to differentiate taxes by marital status, but the latter is unfortunately endogenous. All this is probably why many countries tax differently by marital status, but not by gender.
Spencer Bastani studies the question using a model where, unfortunately, marriage is exogenous and characterized by perfect assortative matching: the most productive men marry the most productive women. When married, spouse bargain over each one's consumption and labor hours. Critical here is the exogenous bargaining power of the husband. Note that it is assumed that marriage always remains viable, there is no divorce, even though divorce is a threat point. In the end, men should be taxed more than women, unless the bargaining power of the husband is high (where lump-sum payments to women are likely to be higher, so they do not lose completely. And remember, this bargaining power is exogenous, and can be changed by law). If household production has a significant public good component, there should be redistribution from couples to singles. Welfare gains from such taxation are important, especially if wage gaps between genders are large. And this is the situation where it is the most feasible: women are then secondary earners, and one can tax secondary incomes differently without causing too much of a commotion.