The answer given here is 1 B.C., and while that precise date is hard to pin down, the broad claim behind it is sound: piñatas are genuinely ancient.
Early versions appear in several cultures independently, with paper-and-clay containers broken open during celebrations, and the form was later reshaped in Mexico into the seven-pointed star that most people picture today. So the tradition long predates the modern party, even if nobody can name the exact year it started.