Sahih Muslim , Book 4, Hadith 1098 (USC-MSA)

Zaid b. Arqam reported: We used to talk while engaged in prayer and a person talked with a companion on his side in prayer till (this verse) was revealed:" And stand before Allah in devout obedience" (ii, 238) and we were commanded to observe silence (in prayer) and were forbidden to speak.

حَدَّثَنَا يَحْيَى بْنُ يَحْيَى، أَخْبَرَنَا هُشَيْمٌ، عَنْ إِسْمَاعِيلَ بْنِ أَبِي خَالِدٍ، عَنِ الْحَارِثِ بْنِ شُبَيْلٍ، عَنْ أَبِي عَمْرٍو الشَّيْبَانِيِّ، عَنْ زَيْدِ بْنِ أَرْقَمَ، قَالَ كُنَّا نَتَكَلَّمُ فِي الصَّلاَةِ يُكَلِّمُ الرَّجُلُ صَاحِبَهُ وَهُوَ إِلَى جَنْبِهِ فِي الصَّلاَةِ حَتَّى نَزَلَتْ ‏{‏ وَقُومُوا لِلَّهِ قَانِتِينَ‏}‏ فَأُمِرْنَا بِالسُّكُوتِ وَنُهِينَا عَنِ الْكَلاَمِ ‏.‏

sunnah.com