The Mishna (28b) teaches that a father (and only a father, not a mother) can make his son a nazir. The source for this law is a point of disagreement between Rabbi Yohanan, who simply says halakha hee be-nazir – there is an oral tradition regarding the laws of nezirut that permits this, and Resh Lakish, who says kedei le-hankho be-mitzvot – that it is permitted so that the father can educate his son with regard to the commandments.
It appears that the concept of kedei le-hankho be-mitzvot is a rabbinic commandment upon a father to teach his child and help prepare him to fulfill mitzvot when he becomes an adult. According to this, the father in our Mishna is preparing his son to keep the mitzva of nezirut, should he choose to accept nezirut upon himself when he grows up. This approach presents several problems that are hinted to by the rishonim and spelled out by the Sfas Emes. From several statements in the Gemara it is clear that people were not encouraged to become nezirim and that a nazir was considered in some way to be a sinner. If so, how can we consider it obligatory upon a father to prepare his son for nezirut?
The Sfas Emes responds to this question by pointing out that the Gemara does acknowledge that nezirut is considered positive under certain circumstances (namely, when it is done for the sake of heaven) and in such a case, it would certainly be considered a mitzva. In a situation where a father recognizes that his son needs to be more careful than the average person, he may feel it appropriate to prepare him for nezirut in its positive sense.