Imam al-Sadiq (`a) is reported to have said, “When the color of the sun changes (i.e. the sun is about to set), you must remember Allah the Almighty and Majestic. If you are at that hour with one who preoccupies you from this, you must leave him and supplicate.
Continue the supplication to be said at sunset as under:
You may say the words of professing that there is no god save Allah and the words of seeking His protection, . You may then put your hand on the head and pass it over your face.
You may then hold your beard and say the following
Imam Ali (as) Sunset Dua from Sahifa Alawiya
بِسْمِ اﷲِ الرَّحْمٰنِ الرَّحِیْمِ
In the name of Allah the Beneficent the Merciful.
اَللّٰہُمَّ اِنِّیْ اَتَقَرَّبُ اِلَیْکَ بِجُوْدِکَ وَ کَرَمِکَ وَ اَتَقَرَّبُ اِلَیْکَ بِمُحَمَّدٍ عَبْدِکَ وَ رَسُوْلِکَ وَ اَتَقَرُّبُ اِلَیْکَ بِمَلَآئِکَتِکَ الْمُقَرَّبِیْنَ وَ اَنْبِیَآئِکَ الْمُرْسَلِیْنَ وَ بِکَ
I wish to seek proximity to You by Your grace and generosity and by Your special servant Mohammed peace be on him and his progeny and through You and through the angels who are near to You.
اَللّٰہُمَّ لَکَ الْغِنٰی وَ بِیَ الْفَاقَۃُ اِلَیْکَ اَنْتَ الْغَنِیُّ وَ اَنَا الْفَقِیْرُ اِلَیْکَ اَقِلْنِیْ عَثْرَتِیْ وَاسْتُرْ عَلَیَّ ذُنُوْبِیْ وَاقْضِ الْیَوْمَ حَاجَتِیْ وَلاَ تُعَذِّبْنِیْ بِقَبِیْحِ مَا تَعْلَمُ مِنِّیْ بَلْ عَفْوُکَ یَسْعُنِیْ وَ جُوْدُکَ
O Allah Self Sufficiency belongs to You and for me is the dependency in Your Presence You are rich and I am indigent forgive my laxities, conceal my sins, and today fulfill my desires, and whatever sins You are aware of, don't chastise me, but put me in Your mercy and Generosity
(then go in Sajdah and recite)
یَا اَہْلَ التَّقْوٰی وَ یَا اَہْلَ الْمَغْفِرَۃِ یَا بَرُّ یَا رَحِیْمُ اَنْتَ اَبَرُّ بِیْ مِنْ اَبِیْ وَ اُمِّیْ وَ مِنْ جَمِیْعٍ الْخَلَآئِقِ اَقْبِسْنِیْ بِقَضَآءِ حَاجَتِیْ مُجَاباً دُعَآئِیْ مَرْحُوْمًا صَوْتِیْ قَدْ کَشَفْتَ اَنْوَاعَ الْبَلاَ یَا عَنِیْ
O the center of piety, O the possessor of forgiveness, O the most generous for the doers of good. You are more generous than my father, my mother and the entire universe. Pass my life in fulfilling my desires. Accept my prayers, have mercy on my voice, You have averted various types of difficulties from me.
(then go in Sajdah and recite)