The Arabic word ‘ya’ is used to call to someone. As an example, if you were in a room and your friend whose name is ‘Azam’ was in the next room, how would you call him? You would say, “Ya Azam!” However, if Azam was on the other side of a football field and you wanted to call him, how would you do it? You would say, “YA AZAM!”
However, if our beloved friend Azam was sitting right next to you, extremely close to you, how would you call him? Of course, you would just turn to him and say, “Azam.” THIS is the closeness that we share to Allah (swt)!
The scholars of balagah say the ya used for calling of Allah (swt) to His servants is hidden in its language to illustrate the intense and extreme closeness Allah (swt) shares with them.
In fact, if you were to look at every single supplication made to Allah (swt) in the Qur’an you would only find the word ya used twice!
From the book, “Khasais Al-T’abir Al-Quran wa Samatuhu Al-Balagha” by Dr. Abdul Matin Al-Mut’i Al-Azhari, and explained to me by Suhaib Webb.