This paper extends the Diamond (1980) model with labor unions to study optimal income taxation and to analyze whether unions can be desirable for income redistribution if income taxes are optimized. Unions bargain with firms over wages in each sector and firms unilaterally determine employment. Optimal unemployment benefits and optimal income taxes are lower in unionized labor markets. Unions raise the efficiency costs of income redistribution, because unemployment benefits and income taxes raise wage demands, and thereby generate involuntary unemployment. We show that unions are socially desirable only if they represent (low-income) workers whose participation is subsidized on a net basis. By creating implicit taxes on work, unions alleviate the labor-market distortions caused by income taxation. We empirically verify whether (i) participation tax rates are lower if unions are more powerful, and (ii) unions are desirable by compiling our own data set with union densities and participation tax rates for 18 sectors in 23 advanced countries. In line with our theoretical predictions, we find that participation tax rates are lower if unions are stronger. Moreover, the desirability condition for unions is never met empirically. Numerical simulations for the Netherlands confirm that unions are not desirable if income taxes are optimized and optimal participation taxes are lower if unions are stronger.