Islam, being a moderate religion, generally encourages marriage as the pure and legitimate way to regulate man’s sexual appetite and procreate. It is against curbing man’s desire through celibacy. Marriage was the Sunnah of the Prophet, as explained in the following Hadith reported Al-Bukhari on the authority of Anas ibn Malik:
A group of three men came to the houses of the wives of the Prophet asking how the Prophet worshiped (Allah), and when they were informed about that, they considered their worship insufficient and said, “How can we attain the Prophet’s status, as his past and future sins have been forgiven!” Then one of them said, “I will offer Prayer throughout the night forever.” Another said, “I will fast throughout the year and will not break my fast.” The third said, “I will keep away from women and will not marry forever.” Allah’s Messenger came to them and said, “Are you the same people who said such-and-such? By Allah, I am more submissive to Allah and more afraid of Him than you; yet I fast and break my fast, I do sleep and I also marry women. So he who does not follow my tradition in religion, is not from me (not one of my followers).”
However, the Islamic ruling on marriage differs according to the state and conditions of each person. It can be highly recommended in some cases, or even obligatory under certain conditions. It can also be prohibited or only permitted under other circumstances.
Sheikh Ahmad Kutty, a senior lecturer and Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states: “If a person has no strong desire for sexual union, and he is confident of safeguarding himself from temptations, then it is not at all obligatory for him to get married, although it is considered highly recommended if he can afford to provide for his spouse and fulfill his spousal obligations towards her.
Marriage is the ideal way in Islam. But at the same time, if a person thinks that he cannot fulfill his spousal obligations, and he has no desire for sexual union, then it shall be considered as permissible for him to remain unmarried. It for reasons mentioned above we find a number of great scholars of the past remained life-long bachelors. Imam Ibn Jarir At-Tabari, the famous author of the most outstanding work on tafsir (exegesis of Qur’an and Sunnah); Imam An-Nawawi, a great scholar of Hadith and a jurist and well known for his piety; Imam Ibn Taymiyah, a great scholar and reformer, were all bachelors. All of these scholars were totally preoccupied with their own scholarly work and life mission so that they did not find any time to think of marriage. Also, they did not have any fear of falling into temptations.
So, ultimately, a person should ask himself where he belongs in this matter. If he has a life mission that is so absorbing and so time consuming, and he is not at all bothered by any temptations of any kind and, therefore, has no fear of falling into sins, then it shall be considered as permissible for him to remain unmarried.
Coming to the question of evidence in the Qur’an and the Sunnah, there is nothing in the sources that makes marriage obligatory unless someone were unable to protect himself from temptations. We learn from the sources that the two Prophets of Allah Yahya (John) and `Isa (Jesus) (peace and blessings be upon them) were bachelors; if it had been sinful to be bachelors, then they would not have led such a life.
To conclude, although marriage is the ideal way in Islam, there is nothing wrong for a person to remain a bachelor, if he has no desire for union and he finds himself capable of protecting himself from temptations. What we said above applies equally to males and females, since there is nothing in the sources to indicate otherwise.”