Why does it say "l'Ulam ha'Heichal"?
Radak: It is as if it says "b'Ulam ha'Heichal." Also "Ish Haragti l'Fitz'i" (Bereishis 4:23) is like b'Fitz'i, and others like this.
Why did he give these names to the pillars?
'Rashi' (Divrei ha'Yamim II, 3:17) #1: Yachin is due to Malchus Beis David, which is compared to the moon - "k'Yare'ach Yikon Olam" (Tehilim 89:38). Bo'az is due to the sun, which goes out with Gevurah and Oz (power) - "Yasis k'Gibor Larutz" (Tehilim 19:6). The 'Beis' in Bo'az [is added,] like the Mem in 'Shmuel' 1 , who was called so "Ki me'Hashem She'altiv" (Shmuel I, 1:29).
'Rashi' (Divrei ha'Yamim II, 3:17) #2: Chiram, who (i.e.) his mother was from Shevet Dan (Divrei ha'Yamim II, 2:13), he called one Yachin, based on Shimshon (from Shevet Dan), who toppled "Shnei Amudei ha'Tavech [Asher ha'Bayis Nachon" (Shoftim 16:29). Shlomo called one Bo'az based on his ancestor.
Radak: It was for a good Siman, since they were at the entrance of the Bayis. Yachin is an expression of Hachanah (preparation), that the Bayis should be prepared (endure) forever, like it says "k'Yare'ach Yikon Olam" (Tehilim 89:38). Bo'az is an expression of Oz (strength). It is like Bo Oz - Hashem should put in it strength and endurance, like "Hashem Oz l'Amo Yiten" (Tehilim 29:11)
Gra: Light comes to the world via the two luminaries, the sun and moon. Malchus Beis David corresponds to them - "v'Chis'o cha'Shemesh Negdi; k'Yare'ach Yikon Olam" (Tehilim 89:37-38). They correspond to Peretz and Zerach. The moon 'rules' (can be seen) at night and [sometimes] during the day; it is Poretz (breaches) the fence and enters the boundary that is not of it. Also, it is [almost always] lacking; Pirtzah refers to a lack. Zerach corresponds to the sun. [Together] they correspond to Mitzvos Aseh and Lo Sa'aseh 2 , Yamin u'Smol, Avodah and Gemilas Chesed, [pillars] on which the world stands. Mitzvos Aseh require intent, and Mitzvos Lo Sa'aseh require Gevurah to overcome the Yetzer - "k'Tzeis ha'Shemesh bi'Gvuraso" (Shoftim 5:31). There are 365 Lavim, like the days in a solar year.
Malbim: Hashem conducts the world in two ways. (a) Natural conduct is fixed from the six days of creation. This is attributed to the left hand; it is called Bo'az. Oz Hashem is fixed in it; it never changes. (b) Miraculous conduct is according to need and preparation (choice) of people; it is called Yachin. They correspond to Malchus and Yesod, respectively.
It seems that the text of 'Rashi' should say so.
I do not know how the Mitzvos Aseh correspond to the moon (PF). Perush ha'Sulam to Zohar Pinchas explains this based on Kabalah. Shlah (Parshas Re'eh) - Moshe's face was like the sun, and Yehoshua's was like the moon (Bava Basra 75a). Moshe fulfilled the Mitzvos Aseh [that depend on Eretz Yisrael] only in Ruchniyus, intent and understanding; Yehoshua fulfilled them in action (with his 248 limbs).