An illegitimate child or bastard was one that had been conceived out of wedlock. As such, the child in question was often seen as an embarrassment.
In 2365, Debin accused Thadiun Okona of fathering his daughter Yanar's "bastard child." In reality, the baby was the child of Yanar and Benzan. (TNG: "The Outrageous Okona")
In 2367, Toral, son of Duras' parentage was in question, as Duras had no known mate. When B'Etor suggested that a genetic scan would prove the Klingon's bloodline, Gowron protested the possibility of Toral becoming Chancellor anyway, saying "The illegitimate son of Duras cannot rule the Klingon High Council." (TNG: "Redemption")