Q. If someone is totally homeless and sleeps on a bench in the park, can he light his menora there?

A. Poskim disagree whether some type of minimal dwelling is needed for the mitzva of ner Chanuka. See above question and Rashi’s opinion quoted (Shabbos 23a, d,h, Haroeh). Igrois Moishe (Y.D. 3: 14: 5) deduces from Rashi that one sleeping outside, without any shelter, as when sleeping on the desert’s sand, is exempt from ner Chanuka (See question 683 in regards to reciting shehecheyanu for the Yom Tov itself). Tosafos (Suka 46a) quotes two reasons why our sages instituted a special bracha for seeing the lights of Chanuka, one of them is that it was acted for satisfying the need of those who don’t have any dwelling.
Peninei Chanuka (p. 56) quotes Horav Eliashuv’s zt”l opinion that soldiers sleeping in tents less that four by four amos, have to light with a brocho, if they are is at least ten tefachim high. Otherwise the tents are not considered a dwelling at all. Ner Ish Ubeisoi (4: 16 n. 34) quotes also Horav Eliashuv’s zt”l ruling that when kindling in a tent without any walls, no brocho should be recited. He seems also to agree that some minimal dwelling is required. Avnei Yashfa (O.H. 5: 94: 2) agrees.
However, Tsitz Eliezer (15: 29) and Beis Sheorim (362) seem to disagree and even soldiers in their trenches should light. Adnei Paz (O.H. 3: 143) and others, after quoting the different opinions of the Rishonim and Poskim, rule that one without any abode, should try to make a shaliach or agent light for him if possible, either way he should light outside without a brocho.
Horav Shlomo Miller’s Shlit’a opinion is similar.

Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit’a