Here "darkness" is a metonym for "night" which is a metonym for "private. And "light" is a metonym for "day" which is a metonym for "public. The phrase "will be heard" can be stated in active form. Alternate translation: "whatever you have said privately at night, people will hear it in the daylight" (See: [[rc://en/ta/man/translate/figs-metonymy]] and [[rc://en/ta/man/translate/figs-activepassive]])
"will be shouted loudly." This can be stated in active form. Alternate translation: "people will proclaim" (See: [[rc://en/ta/man/translate/figs-activepassive]])
Houses in Israel had flat roofs, so people could go up and stand on top of them. If readers would be distracted trying to imagine how people would get up on the house tops, this could also be translated with a more general expression, such as "from a high place so that everyone will be able to hear."