The Talmud (Berachot 8a) presents the following incident:
אמרו ליה לר' יוחנן איכא סבי בבבל תמה ואמר למען ירבו ימיכם וימי בניכם על האדמה כתיב אבל בחוצה לארץ לא כיון דאמרי ליה מקדמי ומחשכי לבי כנישתא אמר היינו דאהני להו כדאמר ר' יהושע בן לוי לבניה קדימו וחשיכו ועיילו לבי כנישתא כי היכי דתורכו חיי א"ר אחא ברבי חנינא מאי קרא אשרי אדם שומע לי לשקד על דלתותי יום יום לשמור מזוזת פתחי וכתיב בתריה כי מוצאי מצא חיים
When they told R. Johanan that there were old men in Babylon, he showed astonishment and said: Why, it is written: That your days may be multiplied, and the days of your children, upon the land; but not outside the land [of Israel]! When they told him that they came early to the Synagogue and left it late, he said: That is what helps them. Even as R. Joshua b. Levi said to his children: Come early to the Synagogue and leave it late that you may live long. R. Aha son of R. Hanina says: Which verse [may be quoted in support of this]? Happy is the man that hearkeneth to Me, watching daily at My gates, waiting at the posts of My doors, after which it is written: For whoso findeth me findeth life. (Soncino translation)
R. Samuel Eidels in his commentary to this passage writes as follows:
יש לפרש ע"פ מה שאמרו בפ' בני העיר עתידין בתי כנסיות ובתי מדרשות שבבבל שיקבעו בא"י כו' וקאמר עד"ז שכני הרעים הנוגעי' בנחלה וגו' דהיינו שנוגע דבר זה בנחלה אשר הנחלתי לבני ישראל שהוא א"י דאותן בתי כנסיות שבבבל גם הם יהיו מכלל א"י שיקבעו שם לעתיד ומייתי עלה איכא סבי בבבל תמה למען וגו' על האדמה וגו' ומסיק דאהנו להו דקדימו וחשיכו כו' דהיינו טעמא דבי כנשתא דבבבל ה"ל כאלו הם על האדמה שהרי יקבע לעתיד שם בא"י
This can be explained by what [the Sages] said in chapter "The Members of the City", that in the future the synagogues and study halls of Babylon will be transplanted to Israel, etc. And about this [Scripture] says "the wicked neighbors that touch the inheritance", that is that they touch this thing of the inheritance that I have given as inheritance to to children off Israel, which is the Land of Israel, so those synagogues in Babylon are included in the Land of Israel where they will in the future be transplanted. And regarding this [the Talmud] brings that "there were old men in Babylon, he showed astonishment, that, etc." "upon the land, etc." and concludes that [the fact that] they came early and stayed late helped them. And the reason is that the synagogues in Babylon are as if they are upon the land [of Israel] since they will be transplanted there in the Land of Israel
R. Moses Sofer writes (Derashot Chatam Sofer Vol. II p. 309b) as follows:
והטעם באמת לכל זה כי הקב"ה ברחמיו וחסדיו השאיר לנו מקדש מעט בה"כ ובה"מ אם נוהגי' בהם קדש אזי הם עתידי' לקבוע בא"י [כמגילה כ"ט.] ויש להם גם עתה קדושת א"י והתפלות נשתלחות לשער השמים אך אם ח"ו אנו נוהגים בהם בזיון ח"ו ומדברים בהם דברים בטלים וההבל של דברים בטלים הוא טמא ומתלבש בו שר של ח"ל והוא גם הוא נעשה בעה"ב בבה"כ ר"ל ומקבל התפילות ומכניסם אל החיצונים וה"ל כעע"ז ככל הדר בח"ל שדומה כמי שאין לו אלוה [ככתובת ק"י
And in truth the reason for all this is that God in his mercy and kindness left us a mini Sanctuary — the synagogue and the study hall. If we treat them as holy then they will in the future be transplanted to Israel (as in Megillah 29a), and even now they have the holiness of Israel and the prayers are sent to the gate of heaven. But if heaven forfend we treat them disrespectfully God forbid and speak in them useless words, and the air of useless words is impure and the angel of the Diaspora is dressed in it and even becomes the owner of the synagogue God forbid, and he accepts the prayers and brings them to the outer ones, and it is like idolatry like one who lives in the Diaspora who is compared to one who has no God (like in Ketubot 110b).
Thus, by putting these three sources together we see that Synagogue attendance causes long life because it is as if one is in the Land of Israel, but if one talks in the synagogue then it is no longer considered as if he is in the Land of Israel. Accordingly, we can say that the reward for not talking during prayer is long life, because refraining from talking grants it the status of the Land of Israel which is how you get long life.