Direct mail is one of the most studied forms of communication in politics. And nearly every study comes to the same conclusion: it works. Studies show just a couple of pieces of mail increasing a candidate's vote share by 5% to 10% - an effect that we don't see with any other type of communication.
Not everybody has a television, and not everybody has cable. Not everybody is going to be looking at any given website that you buy a banner ad on. But everybody can receive mail - and every voter's address is publicly available in the voter file.
Most importantly, direct mail can be targeted to people who will be most receptive to your message. Everybody sees a television ad - which means that Republicans will see your endorsements from Democrats, or Democrats will see your endorsements from Republicans. Mail can be targeted to only likely voters, to only members of one party or another, as well as by age and by gender. People on one side of your city can get one version of a mailer and people on the other side of your city can get the other version.
More and more people are voting early in many states throughout the country. If voters start voting as early as four weeks before an election, it's rarely feasible for a candidate to have the budget to keep their TV ad on the air for six weeks. However, for medium-sized campaigns in cheap television markets, direct mail can supplement television efforts by reaching voters four to six weeks prior to the election.
While Direct Mail is an effective choice for ALL campaigns, be they Federal, State or Local, the further down the ticket, i.e., the more "local," an office is, the older the electorate will be. Everybody checks their mail, but older voters are least likely to be reachable by other means of communication, and most likely to be reachable via direct mail.
Additionally, In many areas, television is too expensive to be affordable in downticket races. Television requires a certain level of saturation to be effective, and sometimes that is just too cost-prohibitive to a grassroots, local campaign. On the other hand, direct mail is effective even without full saturation, and thus is affordable and scalable for local candidates.