This paper provides a model of how media environments affect political polarization. We first develop a model of how media environments, characterized by their levels of accessibility and variety of content, interact with citizens' ideological views and attitudes and political motivation. We then embed it in a model of majoritarian electoral competition in which politicians react to those media-influenced views. We show how equilibrium polarization is affected by changes in the media environment, through two channels: the variety effect, whereby a decrease in media variety leads to convergence in citizens' views and hence to lower polarization; and the composition effect, whereby a lowering of barriers to media accessibility increases turnout and hence lowers polarization, since newly motivated voters are relatively more moderate. We take the model's predictions to the data, in the US context of the introduction of broadcast TV, in the 1940s and 1950s, and radio, in the 1920s and 1930s. We show that, consistent with the model's predictions, TV decreased polarization, and exposure to (network) radio was correlated with lower polarization. The evidence suggests that the variety effect was more important than the composition effect.