I have found the following sources that speak about this minhag.
1) Shiltei Hagiborim (ShHag), Brochos, [4] suggests that the minhag came about because of the phrase in the gemoroh, “someone who comes in from the field in the evening, should go into the shul or the beis hamedrash and if he is used to read (pesukim from Tenach), he should read” because one should read the shema (of maariv) after studying divrei Torah. The choice of this psalm (134) is because it contains the words, “who stand in the house of HaShem at night” (reference to night) or “lift up your hands in holiness and bless (Borchu) HaShem (reference to Borchu).
2) Mishnah Berurah 237:1 (2) quotes the ShHag above.
3) Piskei Teshuvos 237 (3) note 11 says that Psalm 134 is not said when mincha and maariv are said one after the other.
4) Taamei Haminhogim 238 says as above.
5) “The Word of Prayer”, Rabbi Dr E Munk, (1961) p198, says that Psalm 134 “serves as a transition from the professional occupation to the evening prayer.”
6) Besomim Rosh quoted by the Siddur Otzar HaTefilos brings the ShHag.
He then quotes the Elya Rabbah who says that we do not say the Psalm if maariv is davenned straight after minchah, because the reason of “if he is used to read” is only relevant if he did not daven just before maariv.
He then quotes the Eshel Avrohom who says the custom is to say the Psalm whenever it is night.
What comes out, again, is that there are two conditions to saying the Psalm – (1) mincha and maariv not together and (2) maariv bizmano (i.e. after nightfall).
I suggest that the origin of the association of the Psalm with maariv bizmano may come in source 1. There, it is clear that mincha must have been davenned earlier (otherwise the gemoro should have mentioned mincha). It was already evening and the study of pesukim may well have extended until the time for maariv bizmano.