Yes, this is umpire judgment (swing vs. bunt).
The starting point is the rule book definition of a "bunt". Speaking ASA, that definition is: "A pitched ball that is intentionally tapped with the bat, slowly, within the infield". Generally speaking, the rule is essentially the same for most other rule sets.
On one end of the scale we have a "conventional" bunt. Those are fairly obvious and easy to call. The batter either squares or pivots and holds the bat almost staionary in front of her and tries to lightly tap the ball.
On the other end of the scale, the full-fledged "slap" is also easy to see- and definitely NOT a bunt! The bat takes an arcing path toward the ball, with the bathead traveling in a distinct semi-circle. The batter is making an effort to meet the ball with some force, as opposed to letting the ball just tap the into bat.
Somewhere in the middle of this scale is the "drag" bunt. Depending on what the batter does, the scale might tip either way towards a "swing" or a "bunt".
The judgment on "swing" or "bunt" is kind of similar to the judgment on a checked swing. Did the batter try to hit the pitch, or was she trying to let the pitch hit the bat? Was the bat brought around from a conventional, behind the head, position into the hitting zone to meet the ball, or was the bat held stationary, over the zone, prior to contacting the pitch? Was there "follow through" by the bat after the pitch was contacted, or did it remain relatively where the ball hit it?
If it's a conventional bunt, or a slap attempt, those are pretty easy to call. The grey area in the middle requires good judgment to quickly sort out the action and make the right call.