In the Mahābhārata (Virāṭa Parva), Bhīṣma says that wherever good people like Yudhiṣṭhira live, there will be plenty of rain. He could be implying that good people perform yajñas and therefore there will be rain, but the emphasis here is not on yajñas but on good people.
SECTION XXVIII (28) §
... Then that grandsire of the Bharatas, Bhishma the son of Shantanu, conversant with the Vedas, acquainted with the proprieties of time and place, and possessing a knowledge of every duty of morality, after the conclusion of Drona's speech, applauded the words of the preceptor and spake unto the Bharatas ...
The people of the place, where Yudhishthira is, cannot be envious or malicious, or vain, or proud, but must all adhere to their respective duties. Indeed, in the place where Yudhishthira resides, Vedic hymns will be chanted all around, sacrifices will be performed, the last full libations will always be poured, and gifts to Brahmanas will always be in profusion. There the clouds, without doubt, pour abundant rain, and furnished with good harvest the country will ever be without fear. There the paddy will not be without grain, fruits will not be bereft of juice, floral garlands will not be without fragrance, and the conversation of men will always be full of agreeable words. There where king Yudhishthira resides, the breezes will be delicious, the meetings of men will always be friendly, and cause of fear there will be none. There kine will be plentiful, without any of them being lean-fleshed or weak, and milk and curds and butter will all be savoury and nutritious. There where king Yudhishthira resides, every kind of corn will be full of nutrition and every edible full of flavour.
There where king Yudhishthira resides, the objects of all the senses, viz.,--taste, touch, smell, and hearing, will be endued with excellent attributes. There where king Yudhishthira resides, the sights and scenes will be gladdening. And the regenerate ones of that place will be virtuous and steady in observing their respective duties. Indeed, in the country where the sons of Pandu may have taken up their abode during this thirteenth year of their exile, the people will be contented and cheerful, pure in conduct and without misery of any kind. Devoted to gods and guests and the worship of these with their whole soul, they will be fond of giving away, and filled with great energy, they will all be observant of eternal virtue.
There where king Yudhishthira resides, the people, eschewing all that is evil, will be desirous of achieving only what is good. Always observant of sacrifices and pure vows, and hating untruth in speech, the people of the place where king Yudhishthira may reside will always be desirous of obtaining what is good, auspicious and beneficial. There where Yudhishthira resides, the people will certainly be desirous of achieving what is good, and their hearts will always incline towards virtue, and their vows being agreeable they themselves are ever-engaged in the acquisition of religious merit. O child, that son of Pritha in whom are intelligence and charity, the highest tranquility and undoubted forgiveness, modesty and prosperity, and fame and great energy and a love for all creatures, is incapable of being found out (now that he hath concealed himself) even by Brahmanas, let alone ordinary persons.
Another way to interpret this passage is, people who stand by dharma tend to take good care of the environment and therefore will receive good rain.
§ (In the Critical Edition, this is Virāṭa Parva, Chapter 27)