It used to be that rabbis made the community fast to increase their chances of getting their prayers answered. This was done particularly if rain was late in coming. (The first thing God promises if we follow the commandments is rain: אִם־בְּחֻקֹּתַ֖י תֵּלֵ֑כוּ וְאֶת־מִצְוֺתַ֣י תִּשְׁמְר֔וּ וַעֲשִׂיתֶ֖ם אֹתָֽם -- וְנָתַתִּ֥י גִשְׁמֵיכֶ֖ם בְּעִתָּ֑ם וְנָתְנָ֤ה הָאָ֙רֶץ֙ יְבוּלָ֔הּ וְעֵ֥ץ הַשָּׂדֶ֖ה יִתֵּ֥ן פִּרְיֽוֹ [Lev. 26:3-4 and also Deut. 11:13-14]. ) Esther fasted for three days.
Not all rabbis in the Talmud agreed it was a good idea:
Samuel said: He who fasts is called a sinner... Rabbi Eleazar says: He is called holy... Resh Lakish says: He is called pious... Rabbi Shesheth said: The young yeshiva student who fasts [is not meritorious]... There is no public fast in [the Jewish community of] Babylonia except for Tish'a b'Av. [Taanit 11a-b]
Is this done anywhere anymore? When did it stop? Can you give sources on the evolution of the idea of "fasting for divine favors" in Judaism?