Thank you for your question. The occurrence of Layaltul Qadr during the month of Ramadan is derived from the Qur'an itself. In surah al-Baqarah verse 185, God says:
"The month of Ramadan is that in which the Quran was revealed"
And the night in which the Qur'an was revealed was the Night of Decree as is stated in the first verse of surah al-Qadr:
"Surely We revealed it on the night of decree."
However, the Qur'an does not specify which night in the month of Ramadan lalat al-Qadr is and so the next step is to turn to the traditions on the subject.
While the last 10 nights have been generally specified for a person to seek the night of Qadr in the traditions in the books of the school of the Ahl al-Bayt (as), there are more specific traditions that mention the 19th 21st and 23rd nights of the holy month, with each night playing its own role in the passing of the decree for the upcoming year. There is further specification of the 21st and 23rd nights and other traditions that specify the 23rd night.
As for the 27th night, while there are many traditions narrated in the books of the Ahl al-Sunna concerning which of the nights of Ramadan is the night of Qadr, the 27th has become the most popular.
May you always be successful.