When should charity be given?
The Gemara (Bava Batra 10a) relates that Rabbi Elazar would give a small sum of money to charity prior to praying since the verse (Tehilim 17:15) says “I will see Your face through charity.” In other words, prior to beholding Hashem’s Presence as it were, in prayer, it is a commendable act to give charity.
Based on the principle there is a widespread custom to give charity during the Vayvarech David section of Pesuke Dezimra, specifically when reciting the words “Ve’ata Moshel Bakol” (lit. “and You rule over everything”). According to Kabbalah, one should first give two coins and then one single coin, although this does not preclude the giving of any amount in any denomination. Any form of giving is acceptable, whether it is directly to a needy person or into a Tzedaka box. If a Tzedaka box is not available the Kaf Hahaim (51:44) says that one may take money with one’s right hand (as should always be the case) and place it into one’s left hand and designate it for charity. Furthermore, on Shabbat when handling money is not permitted, or if one does not have any money on one’s person, one may have in mind to give a certain amount of money to charity at a later time. One may also loan a person money prior to praying and according to the Rambam (Hilchot Matanot La’evyonim, 10:7), a loan is the highest form of charity.
Charity has the power to remove any spiritual barriers which would otherwise hinder the acceptance of one’s prayers and therefore, it is praiseworthy to give charity not only before Shaharit but before Minha and Arvit as well.
Summary: The common custom to give charity during Vayvarech David in the morning, but it is commendable to do so before all prayers.