(This was posted 2 years ago with slight changes)
Today is Yom Kippur Koton. There is a well known minhag to say a tefila for one's children that they should go in the proper derech, on Erev Rosh Chodesh Sivan. Since this year that falls out on Shabbos, it is usually recited on Yom Kippur Koton. It can be recited Friday also, or any other day of the year. The source for this is the Shlah HaKodosh (Mesechta Tamid, Ner Mitzva), where he says:
"There is an obligation to daven and ask from Hashem every need we have, at any time, because it all comes from Him. People should be especially careful to daven for their children to be "kosher" forever. My heart tells me that an auspicious time for this is Erev Rosh Chodesh of Sivan, because that is the month we received the Torah and we are called "children of Hashem our G-d. It is worthy for man and wife to fast and do teshuva." (It is actually Yom Kippur Koton. Some daven a special Mincha with slichos, and some also fast a whole or half day and read Vayichal from a Sefer Torah, like on a Taanis Tzibur.)
The tefila the Shlah lists was written by Reb Shabsei Sofer of Premishla, a talmid of the Levush, and can be found here (with an English translation).
The Shlah says one should also have in mind their children by Birchas HaTorah (v'nihiye anachnu v'tzetzoeinu), Ahava Rabbah (v'sein bilibeinu) and Uva Litzion (l'maan lo nega lorik v'lo neled l'beholo)
Tanna Devei Eliyahu says one should constantly ask for mercy from Hashem that his children shouldn't sin.
Sefer Chasidim says one should daven for their children and grandchildren.
Rabbeinu Yonah in Iggeres HaTeshuva says a woman should daven for her children, night, morning and afternoon, that they should fear Hashem and be successful in Torah. He says she should also do this while giving tzedaka and light Shabbos candles.
Many of the great tzadikim (from all segments, Sephardim, Ashkenazim, Litvish, Chassidish) said that all of the success of their children came about because they constantly davened and cried to Hashem for that their children should go in the proper derech.
Other Segulas for Good Children
There are many segulas for good children; I will list a few here.
It is brought down in many places that tznius is a great segula for good children. The Mishna Berura quotes the Gemara in Yoma that says a very modest woman name Kimchis, merited having many sons who became Kohanim Gedolim because of her great modesty.
Making sure that people who serve Hashem have parnasa is a segula that one's children won't be swayed to bad influences. (Sefer Hamidos)
R' Yissachor Dov of Belz told someone whose son was straying a bit from the ways of his father, to bring guests into his house.
Reb Yechezkel Shraga Halberstam - Shiniva Rav says that serving meat at a Bris is a segula for the child to grow up properly. (Divrei Yechezkel)
Washing a childs hands, negel vaser, before the age of 3, even though not halachically required, is a segula for the child's yiras shomayim. (Rav Wolbe, quoting Chazon Ish)
Reb Nachman of Breslov says that if a boy comes to him before the age of 7, he will be saved from sin. (Chaye Mohoran/Tzadik) Reb Avrohom B'Reb Nachman Chazan says that he was referring to "mikra layla". He also says that this also applies after Reb Nachman's passing and that the boy should give tzedaka and recite Tikun Haklali (as outlined in Sichos HaRan and Chaye Mohran). (Kochvey Ohr) Many people, even ones that aren't "Breslovers", take their sons to Uman at various times during the year, before they turn 7.
See here for a segula to do after a child is born.