Rabbi Yehuda Halevi explains that regular, fixed prayer is the means by which the soul draws close to God, the Divine King; just as subjects have fixed audiences with an earthly king, Israel has fixed times of tefillah to stand before the Heavenly King and renew their attachment to the Divine.
וְכַאֲשֶׁר עָשָׂה צָרְכֵי כָל אֶחָד מֵהֶם וְנָתַן לַטִּבְעִיִּים מַה שֶּׁיַּסְפִּיק לָהֶם מֵהַמְּנוּחָה וְהַשֵּׁנָה, וְלַחִיּוּנִיִּים מַה שֶּׁיַסְפִּיק לָהֶם מֵהַקִּיצָה וְהַתְּנוּעָה בְמַעֲשֵׂי הָעוֹלָם, אָז יִקְרָא אֶל עֲדָתוֹ, כְּמוֹשֵׁל הַנִּשְׁמָע שֶׁקּוֹרֵא אֶל חֵילוֹ הַשּׁוֹמֵעַ לַעֲזֹר לוֹ, לְהִדָּבֵק בַּמַּדְרֵגָה שֶׁהִיא לְמַעְלָה מִמֶּנָּה, רְצוֹנִי לוֹמַר: הַמַּדְרֵגָה הָאֱלֹהִית אֲשֶׁר הִיא לְמַעְלָה מֵהַמַּדְרֵגָה הַשִּׂכְלִית, וִיסַדֵּר עֲדָתוֹ וִיתַקְּנָהּ, וְדוֹמֶה לַסֵּדֶר שֶׁסִּדֵּר מֹשֶׁה עָלָיו הַשָּׁלוֹם לַעֲדָתוֹ סְבִיבוֹת הַר סִינַי, וּמְצַוֶּה הַכֹּחַ הַחֶפְצִי שֶׁיִּהְיֶה מְקַבֵּל וְשׁוֹמֵר לַאֲשֶׁר יָבֹא מֵאֶצְלוֹ צִוּוּי, וְיַעֲשֵׂהוּ לְעִתּוֹ, וִישַׁמֵּשׁ בַּכֹּחוֹת וּבָאֲבָרִים כְּפִי אֲשֶׁר יְצַוֶּה מִבְּלִי הַמְרוֹת
He orders his will power to receive every command issued by him obediently, and to carry it out forthwith. He makes faculties and limbs do his bidding without contradiction, forbids them evil inclinations of mind and fancy, forbids them to listen to, or believe in them, until he has taken counsel with the intellect. If he permits they can obey him, but not otherwise.