5-point stars on barns became popular in the late 19th Century, when they were used as a sort of giant nut, securing long rods that spanned the gables of barns to keep them from buckling.
Barn builders in Ohio and Pennsylvania developed trademark star styles and used them as a kind of signature of their barn designs, according to barn star historian Bill Plank.
In March 1889, a major earthquake had its epicenter in York (PA). Perhaps that event stimulated the appearance of stars on barns as a symbol of Good Luck or Goodwill.
Information from Lancaster Intelligencer Journal July 1, 2005