So the angels called him while he was standing in prayer in the chamber, "Indeed, Allāh gives you good tidings of John, confirming a word from Allāh and [who will be] honorable, abstaining [from women], and a prophet from among the righteous."
The Supplication of Zakariyya, and the Good News of Yahya's Birth
When Zakariyya saw that Allah provided sustenance for Maryam by giving her the fruits of winter in summer and the fruits of summer in winter, he was eager to have a child of his own. By then, Zakariyya had become an old man, his bones feeble and his head full of gray hair. His wife was an old women who was barren. Yet, he still supplicated to Allah and called Him in secret,
رَبِّ هَبْ لِى مِن لَّدُنْكَ
(O my Lord! Grant me from Ladunka,) from You,
ذُرِّيَّةً طَيِّبَةً
(A good offspring) meaning, a righteous offspring,
إِنَّكَ سَمِيعُ الدُّعَآءِ
(You are indeed the All-Hearer of invocation.) Allah said,
1. The expression, کَلِمَۃ اللہ 'a word of Allah' refers to Sayyidna 'Isa (علیہ السلام) . This term is used for him because he was created, in an unusual manner, simply by the will and command of Allah - without a paternal linkage.
2. The second quality of Sayyidna Yahya (علیہ السلام) has been described by the word, حَصُورً 'hasur' translated here as 'abstinent'. It means that he was very particular about keeping himself shielded from temptations, that is, from things one habitually enjoys. When we say one abstains from enjoyments of life, the statement includes abstinence even from fulfilling the desires of things allowed, for example, good food, good dress and marital life and things like these. Since the quality of abstinence has been mentioned here in a positive frame of reference, it obviously seems to suggest that this is the better way, although ahadith prove the higher merit of living in the bond of marriage. In this situation, the considered opinion is that one whose condition is similar to that of Sayyidna Yahya (علیہ السلام) and who is so absorbed in the thought of his life-to-come that he feels no need to have a wife nor has the time and frame of mind to fulfil the rights of his wife and children, then, for such a person this is the better choice. It is because of this particular reason that ahadith which describe the merit of marriage come up with a restrictive clause as well, that is, مَنِ استطاع منکم الباءَۃ which means that one who can marry and is capable of fulfilling the due rights of his wife, should marry, for this is better for him; otherwise, he is not ad-vised to marry. (Bayern al-Qur'n)
Tazkirul Quran
Maulana Wahiduddin KhanOn ayahs 32–43
It is a psychological reality that one who loves someone cannot at the same time love the enemy of the beloved. It is also a fact that when the beloved is a Being who has the status of one’s Creator and Sustainer, then this love will necessarily bring about in the lover the desire to obey that Being in all matters. If the love of God does not produce in him feelings of obeisance to Him, then such a love is false. A believer who is one in name only will be included among the deniers. God Himself has testified to the Prophet’s total obedience to Him in all matters. So the authentic example of a life of God-worship in this world is only such as was handed down to us by His messenger.
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.