Naming a Child After a Tzaddik

Our Sages say in Tractate Berachot, "A name has an impact," meaning, the name of an individual influences his character. Therefore, naming a child after a righteous person is a source of blessing for him.
The Midrash says in Tanchuma, Haazinu chapter 7:
"A person should always examine names carefully to give his son a name which befits righteousness, for sometimes a name could cause good, and sometimes it could bring about evil, as we learn regarding the Spies [whose names reflected their actions]."

The writings of the Arizal state that when parents choose a name for their child, their choice isn't happenstance. The name which God places within their minds corresponds with the nature of their child's soul.
As the Rebbe cites in the following letter (3 Teves 5712):

"Regarding the core matter: Naming a child is a tremendous endeavor and a great responsibility. Chassidism explains that a name is the conduit for the life and vitality of the individual or item carrying that name. (See at length in the writings of the Shaloh in the preface to Bayit Acharon, in Tanya - Shaar Hayichud V'haemunah at the end of chapter 1, Likutei Torah Parshat Behar, in the discourse "Et Shabtotai" chap. 2, and in many places).
“Therefore, the writings of the Arizal state:
“'When a person is born and his parents choose a name for him...God places in their mouths the name which is appropriate for that soul.' (Sefer Hagilgulim preface 23, Emek Hamelech Gate 1 chapt. 4, and Or Hachayim - Devarim 29:17).”

The custom to name children after a Rebbe is a long-time Chabad tradition, and is customary in many other Jewish communities as well.
King Solomon writes in Proverbs (10:7): "The memory of a righteous person is a blessing."
The deeper meaning of this verse is that the mention of a Tzaddik's name brings blessings upon those named after him; they receive a "ray" of the Tzaddik's soul, by virtue of their connection by name. For this reason, Jewish people often named their children after the Forefathers, and after righteous people of all generations.

The Rebbe himself spoke about this custom several times. For example:

"The response of the Rebbe, my father-in-law, in similar cases is well-known: He would not involve himself in these matters [choosing a name for a child]. It is understood based on the teaching brought in the writings of the Arizal…that from heaven, parents are given the idea for the name of their newborn son or daughter, a name that is appropriate for their soul." (Igrot Kodesh vol. 9 pg. 136).

"Mazal Tov for the birth of your son. Your suggestion to name him after our Rebbe [the Previous Rebbe] is appropriate. May you raise him to Torah, Chupah, and good deeds." (A response to noted Chassid Rabbi Avraham Pariz, who informed the Rebbe of the birth of his son on 4 Elul 5710, and was indeed named Yosef Yitzchak. Reprinted from Yimei Melech vol. 3 page 1094).

A certain individual once asked the Rebbe how to name his child, and the Rebbe responded,
"The name of the Tzemach Tzedek."
The questioner asked,
"But our custom is to give a name only after someone who passed on, but the Rebbe is alive and well?"
The Rebbe responded with a story:
"The Rogatchover Gaon once blessed a woman to bear children. After some time, his blessing came to fruition. The woman returned to the Gaon and asked which name to give her child, and he responded, 'Yosef.'
"'But you are still alive?' the woman asked.
“The Gaon responded, 'If so, wonderful! The child will live as well!'" (Mikdash Melech vol. 4 pg. 506).

Following the passing of the Rebbe's father, Rabbi Levi Yitzchak Schneerson, in Soviet exile in Kazakhstan, an acquaintance named his newborn son 'Levi Yitzchak.'
He received a unique letter from the Rebbe, who wrote:

“By the Grace of God, 12 Sivan 5712

“...Reb Menachem Mendel sheyichye,

“Greetings and blessings!

“I just received your letter in which you notify that a son was born to you with mazal tov, and he was called in Israel in the name of my father o.b.m. – may [your son] live and long and good life.

“I hereby express my blessing, that you and your wife sheyichyu merit to raise him to Torah, Chupah and good deeds, with abundance and with spiritual and physical tranquility.When I will visit the resting place of my father-in-law the Rebbe, I will mention you and your wife and the newborn sheyichyu for good health, and for physical and spiritual goodness.
“May it be God's will, that just as you caused me such great gratification by naming your son after my father o.b.m., may God grant you gratification and nachas from your entire family and from yourself, from their physical state as well as their spiritual state, and may you merit to always relay news of only goodness and kindness.

“With blessings of Mazal Tov, Menachem Schneerson.”

During a Farbrengen on Shabbos Parshas Vayishlach, 12 Shevat 5714, the Rebbe spoke in a very unusual manner regarding naming children, and for the first time mentioned the possibility of naming a child Menachem Mendel.
The following are the Rebbe's words:

"...In these times, the darkness is double and triple fold; as the Midrash says, the last moments before daybreak are the darkest moments of the night. In order to break free and eradicate the darkness, there is a need for miracles. Miracles have the ability to jolt one's Animal Soul.
“We needn't take into consideration that this path of serving God is characteristic of Polish Rebbes; the main thing is that we reach the goal. Being that there is currently a need for miracles, and as we explained earlier, God grants even unsuitable leaders, "the blind lead sheep," the full powers of a genuine "shepherd" – with that power I hereby declare: 

"All those who need to be blessed with children, will be blessed  with children this year. They will be worthy Chassidic children. (When people would approach the Mitteler Rebbe to be blessed with children, he would sometimes send them to his brother Reb Chaim Avraham, who would don his shtreimel and bless the supplicant with a child, ‘on condition’ that it be a son and a worthy chassid). These children should be named after the Rebbe. 

"Those who cannot give that name because of a parent with the same name (as customary among Ashkenazic Jews, who do not name a child after a living parent), could give the name Menachem Mendel, the name of the Tzemach Tzedek..."