Could you please inform whether there is any regulation in Koran and/or hadith regarding ruling that boys would be brought up in a better way by the father, and is there any hadith advising the boys to be transfered at the age of 7 - as some scholars stipulate it, to be transfered from mother which is divorced from father of the child?
One hadith that indicates that the boy should be with his father is that he is the one obligated to teach him prayer and the matters of religion. There is also the Hadith of Abu Bakr where he ordered that Umar's child ^Aasim should be with his mother until he grows up. There are hadiths where the child is given the choice, but al-Tahaawiy (the great mujtahid and grandson of al-Muzani, Al-Shaafi3iy's famous student) pointed out that this was by the agreement of the parents and with the supplication of the Prophet (may Allah raise his rank) to guide the child. Other scholars said the court goes by the choice (see answer to next question). The Hanafi's pointed out that this means that a child, who is not yet responsible for his own affairs and cannot conduct a valid contract, is given the power to dictate binding decisions on the court. This cannot be permitted without a proof that has no alternative explanation - and there is no such proof.
I read also opinions of some honourable scholars who say that mother is the best teacher for both kids, as she is more compasionate, patient and more suitable to be a teacher (by nature) for both boy and girl, also due to the fact, that men are working outside the house (thus spent less time with their kids, do not have much time and energy after coming back home from work to take proper care after them).
In general women have a greater right to raise children than men, and this starts with birth. However, the right to raise the child in case the child is separated is something the scholars had different views on.
The Hanafis say that her right ends when the boy reaches 7, since this is the time he starts learning to pray and is able to clean himself in the bathroom and so on. The girl is transfered when she reaches an age at which she is desired by men (about 9 lunar years). Before this, the child is mainly in need of the extra compassion, sympathy and patience of the mother. After that the boy needs to learn how men behave and someone to control him, and the girl needs someone to protect her and her dignity and to find a suitable husband.
-If the father is a big sinner, then the right goes to the grandfather.
The Malikiah said that the right to raise the child lasts until puberty, or if it is a girl, until she gets married.
The Shaafi3iyah said that when the child reaches the age of distiction (normally 7 to 8 years old ) it is given the choice of whom to live with.