Are you sure the birds that are pecking on your house are nuthatches? The birds that do this are usually woodpeckers. Woodpeckers often drill on houses to announce to other woodpeckers that this is their territory, and to attract and keep mates. In other words, the tapping is the woodpecker's song.
Regardless, the solutions are the same: There are many way to keep woodpeckers from drilling on houses, including scaring them with noise, hanging shiny strips of mylar, tinsel, aluminum, or metal. Using silhouettes of owls and hawks, or to cover the area with netting or wire. There are chemicals on the market, as well, but I don't think they work.