Even today, in the 21st century, if women have illegitimate children, people look down upon them, and call the whores and what not. Kunti was a mere maiden of 13 or 14 when she had Karna, and she did not know right from wrong. Although this does not excuse her behavior, it gives us a reason why she did it. What would she have done? She was a young girl, and she was scared she would bring disgrace to her father. Except for one or two of her most trusted maids, no one knew of her pregnancy. If you think of it in today's terms, at least she didn't get an abortion (although I don't think abortions existed back then?).
After marrying Pandu, Kunti became a queen of the Great Kurus, whose fame was known widespread. She had expectations to live up to, so it would have been worse for the news to come out then than before. In the martial exhibition, she didn't say Karna was her son, because she was still a queen, or at least princess, of the Kuru-Vansh, and she still had the house honor to uphold.
I feel sorry for the character of Kunti, because although she made several mistakes, she still suffered. Also, it was destiny that the Mahabharat happen the way it did, or Duryodhan wouldn't die. If Kunti had told everyone that Karan was her son, and if he had joined the Pandavas, much of the story would have been changed, and the war might not even have happened, because without Karna on his side, Duryodhan was nothing.
I think Kunti told Karna about his brothers in the end, because she felt she had no course of action left except for the truth to be known, and she desperately wanted the war to be averted. If she had told the Pandavas that Karna was their brother, they would have refused to fight, and Duryodhan would continue to keep the kingdom while the Pandavas continued to live with Virata and Draupadi would have remained unavenged. I think the one main reason everything happened in the Mahabharat as it did is fate, or destiny. There can be no other explanation.