Hamlet is chiding Polonius for similarly sacrificing his own virgin daughter -- barring her marriage and procreation (and ultimately sacrificing her life). Also according to Steve Roth, he may be "commenting slantingly on his own situation": Jephthah was "the son of a harlot."
It is also a reference to a then-current ballad on the subject:
I have read that many years agoe,
When Jepha, judge of Israel,
Had one fair daughter and no more,
Whom he loved passing well.
And as by lot, God wot,
It came to passe most like it was,
Great warrs there should be,
And who should be the chiefe, but he, but he.