The Muslims can accustom themselves to weep for fear of Allah (Subhaanahu Wa Ta’aalaa), by doing the following:
Making themselves feel fear of Allah (Subhaanahu Wa Ta’aalaa).
This weeping is the fruit of beneficial knowledge, as al-Qurtubi says in his commentary on the Quraan (interpretation of the meaning): "They fall down on their faces weeping, and it increases humbleness in their hearts.” (Al-Israa 17:109)
This is an eloquent description of them and praise for them. It is the duty of everyone who acquires knowledge to reach this level, so that when he hears the Quraan he is filled with fear and humility. In Musnad al-Daarimi it is narrated from Abu Muhammad that al-Taymi said: “Whoever is given knowledge and does not weep, he deserves not to have any knowledge, because Allah has described those who have knowledge; then he recited the above quoted Aayah. (Al-Jaami’ li Ahkaam il-Qur’aan, 10/341-342)
Reading the Quraan and pondering its meanings
Allah (Subhaanahu Wa Ta’aalaa) says (interpretation of the meaning): “Say: ‘Believe in it or do not believe in it; when it is recited to those who were given knowledge before it, they fall down on their faces in prostration.’ And say: ‘Pure is our Lord. Certainly, the word of our Lord was sure to be fulfilled.’ They fall down on their faces weeping, and it increases humbleness in their hearts.” (al-Israa 17:107-109)
Allah (Subhaanahu Wa Ta’aalaa) also says: “Those are the people whom Allah has blessed with bounties, the prophets from the progeny of ‘Adam, and of those whom We caused to board (the Ark) along with Nooh, and from the progeny of Ibrahim and Isra‘il (Yaqoob), and from those whom We guided and selected. When the Aayaat of The Rahmaan (The All-Merciful) were recited before them, they used to fall down in Sajdah (prostration), while they were weeping.” (Maryam 19:58)
It was narrated that Hadhrat ‘Abdullah bin Mas’ood said that the Prophet (SallAllaho Alaihe WaSallam) said to him: "Recite the Quraan to me.”
He said: "O Messenger of Allah! Shall I recite it to you when it was revealed to you?”
The Prophet (SallAllaho Alaihe WaSallam) said: "I like to hear it from someone else.”
So he recited Soorah al-Nisaa to him, and when he reached this Aayah:
فَكَيْفَ إِذَا جِئْنَا مِنْ كُلِّ أُمَّةٍ بِشَهِيدٍ وَجِئْنَا بِكَ عَلَى هَؤُلَاءِ شَهِيدًا [النساء: 41]
“Then, how (awful a spectacle) would it be when We shall bring a witness from every community, and shall bring you over them as a witness” (al-Nisaa 4:41)
The Prophet (SallAllaho Alaihe WaSallam) said: "That is enough for now.”
When Hadhrat ‘Abdullah bin Mas’ood turned to him, he saw the eyes of the Prophet (SallAllaho Alaihe WaSallam) were streaming with tears. (Bukhari, Muslim)
Knowing the greatness of the reward for weeping, especially when one is alone
Hadhrat Abu Hurairah narrated that Allah (Subhaanahu Wa Ta’aalaa)’s Messenger (SallAllaho Alaihe WaSallam) said: "A man who weeps for fear of Allah will not enter Hell until the milk goes back into the udder, and dust produced (when fighting) for the sake of Allah and the smoke of Hell will never coexist.” (At-Tirmizi, an-Nasaaee)
"until the milk goes back into the udder” is a metaphor for it being impossible, as in the Aayah where Allah (Subhaanahu Wa Ta’aalaa) says (interpretation of the meaning):
لَا يَدْخُلُونَ الْجَنَّةَ حَتَّى يَلِجَ الْجَمَلُ فِي سَمِّ الْخِيَاطِ [الأعراف: 40]
“……they shall not enter Paradise unless a camel passes through the eye of a needle.” (Al-A’raaf 7:40)
Allah (Subhaanahu Wa Ta’aalaa)’s Messenger (SallAllaho Alaihe WaSallam) said: "There are seven whom Allah will shade with His shade on the day when there will be no shade but His: a just ruler; a young man who grows up worshipping Allah; a man whose heart is attached to the Masjid; two men who love one another for the sake of Allah, meeting and parting on that basis; a man who is called (to commit sin) by a woman of high status and great beauty and he says, ‘I fear Allah’; a man who gives in charity so secretly that his left hand does not know what his right hand is doing; and a man who remembers Allah when he is alone and his eyes flow with tears.” (Bukhari, Muslim)
Weeping when alone is singled out because being alone is a time when the heart tends to become harder and there is a stronger motive to commit sin, and it is farthest removed from the possibility of showing off. So if a person strives to do this, and makes himself feel the greatness and might of Allah (Subhaanahu Wa Ta’aalaa), and his eyes flow with tears, then he deserves to be beneath the shade of the Throne of the Most Merciful on the Day when there will be no shade but His shade.
Thinking about your situation and your boldness in committing sin, and fearing to meet Allah (Subhaanahu Wa Ta’aalaa) in such a state
One of the righteous people used to weep night and day, and something was said to him about that. He said: "I am afraid that Allah (Subhaanahu Wa Ta’aalaa) will see me committing sin and will say: ‘Go away from Me for I am angry with you.'”
Hence Sufyaan used to weep and say: "I am afraid that my faith will be taken away at the moment of death.”
Ismail bin Zakariya said about his neighbor, Habeeb bin Muhammad, that every evening he heard him weeping and every morning he heard him weeping, so he went to his wife and said: “What is the matter with him? He weeps in the evening and he weeps in the morning!”
She said to him: “By Allah! When evening comes he fears that he will not live till morning and when morning comes he fears that he will not live till evening.'”
The great elders in Deen used to weep and grieve a great deal. Yazeed al-Raqaashi was criticized for weeping a great deal and it was said to him: "If the Fire had been created exclusively for you, you would not weep more than this”.
He said: "Has the Fire been created for anyone other than me and my companions and brothers among the jinn and mankind?”
‘Ata’ al-Sulaimi was asked: "What is this grief?”
He said: "Woe to you! Death is close at hand, the grave is my house, on the Day of Qiyaamah (Resurrection) I will stand and my path is over a bridge across Hell, and I do not know what will become of me.”
Faddalah bin Saifi used to weep a great deal. A man entered upon him when he was weeping and said to his wife: "What is the matter with him?”
She said: "He says that he wants to undertake a long journey and he does not have proper provision for it.”
One night al-Hasan woke up weeping, and he disturbed the other people in the house with his weeping. They asked him what was the matter and he said: "I remembered a sin that I committed and I wept.”
It was narrated that once Hadhrat Tameem al-Daari recited this Aayah (interpretation of the meaning):
أَمْ حَسِبَ الَّذِينَ اجْتَرَحُوا السَّيِّئَاتِ أَنْ نَجْعَلَهُمْ كَالَّذِينَ آمَنُوا وَعَمِلُوا الصَّالِحَاتِ [الجاثية: 21]
“Do those who have committed evils assume that We will make them like those who believe and do righteous deeds, so as their life and death becomes equal?” (Al-Jaathiyah 45:21)
Then he started repeating it and weeping until morning.
Hadhrat Huzaifah used to weep intensely, and it was said to him: "Why are you weeping?”
He said: "I do not know what is ahead of me – Divine pleasure or divine wrath.”
Sa’d ibn al-Akhram said that he was walking with Hadhrat ‘Abdullah bin Mas’ood. When they passed by the blacksmiths, who had brought a piece of iron out of the fire, Hadhrat ‘Abdullah bin Mas’ood stood and looked at the molten iron and wept.
Making yourself feel regret and feeling that you have fallen short in your duties towards Allah (Subhaanahu Wa Ta’aalaa).
The tears of the repentant at night quenches thirst and cure sickness, as one of the Mufassireen, Abu Ja’far al-Tabari, said in his commentary on the Aayah (interpretation of the meaning):
أَفَمِنْ هَذَا الْحَدِيثِ تَعْجَبُونَ[]وَتَضْحَكُونَ وَلَا تَبْكُونَ [النجم: 59-60]
“Do you then wonder at this discourse (Quraan) and laugh (at it), and not weep.” (An-Najm 53:59-60)
Do not weep at the warnings contained therein to those who disobey Allah (Subhaanahu Wa Ta’aalaa), when you are people who commit sin, "Wasting your (precious) lifetime in pastime and amusements (singing)” (an-Najm 53:61) – you are heedless of the lessons and reminders contained therein, turning away from its Aayaat. (Jaami’ al-Bayaan ‘an Ta’weel Aayah al-Quraan)
Weeping out of fear of a bad end
It was narrated that Hadhrat ‘Abdullah bin ‘Umar said that when Allah (Subhaanahu Wa Ta’aalaa)’s Messenger (SallAllaho Alaihe WaSallam) passed by al-Hijr (the land of the people of Thamood), he said: "Do not enter the dwellings of those who wronged themselves, lest what befell them befall you, unless you are weeping.”
Then the Prophet (SallAllaho Alaihe WaSallam) covered his head and walked quickly until he had left the valley. (Bukhari, Muslim)
Al-Nawawi included this Hadeeth in a chapter entitled, "Weeping and feeling fear when passing by the graves of the wrongdoers and the places where they were killed, and expressing one’s need of Allah (Subhaanahu Wa Ta’aalaa), and being careful not to be negligent in that.” (Riyaadh al-Saaliheen)
Suhbah (Company) of pious Ulamaa (Scholars) and listening to them
A Sahaabi (Companion) of Prophet Hadhrat Muhammad (SallAllaho Alaihe WaSallam), Hadhrat ‘Irbaadh bin Saariyah, who was one of those who used to weep, said: "Allah (Subhaanahu Wa Ta’aalaa)’s Messenger (SallAllaho Alaihe WaSallam) delivered a deeply moving speech at which our eyes began to overflow and our hearts melted.” (at-Tirmizi, Abu Daawood and Ibne Maajah)
May Allah (Subhaanahu Wa Ta’aalaa) help us and you to do that which our Lord loves and is pleased with him. Aameen!