Ruling on distributing sweets on the birth of a child
Question

Does distributing sweets on the part of a family to whom a child has been born come under the heading of imitating the disbelievers?
Praise be to Allah.There is nothing wrong with expressing joy and happiness at the birth of a child, and distributing sweets and the like. This is an ancient custom that is widespread among Muslims and others, so it is not regarded as imitating the disbelievers, because it is not a custom that is exclusively theirs.
Shaykh Ibn ‘Uthaymin (may Allah have mercy on him) was asked:
A woman is asking: It is their custom, when a child is born to them and the child begins to walk, that on this occasion they have a celebration to which they invite the neighbours, and it is considered to be a special occasion. At this celebration, the mother of the child scatters sweets on his head, as a sign of optimism and an expression of joy and happiness. What is the ruling on this celebration, and is it similar to celebrations for children’s passing exams in school?
He replied:
With regard to celebrating happy occasions, there is nothing wrong with it, and a person may do whatever he can on condition that it does not involve anything that is haram and does not stem from wrong beliefs, because this is something natural  that is prompted by innate human nature. All humans rejoice on occasions such as these, and I do not see anything wrong with that."(Al-Fatawa ath-Thalathah).