http://www.ccel.org/ccel/mcgarvey/gospels.vii.viii.html
14 Ye are the light of the world. A city set on a hill cannot be hid.
Cities are built on the tops of hills to make them easier to defend: the attackers must climb uphill, exposed, before reaching the walls of the city. Churches / Christians are sometimes like that: we can set ourselves apart and build a little moat around our lives so that any bad influence that comes at us can be seen and defended against. But oh, how pernicious those influences are, and they have a way of tunneling under the moat to reach us.
Cities are also built on the tops of hills to show them off. Everyone in the surrounding countryside can see the city, set upon the hill. And again, if we call attention to ourselves (for good), then everyone around us will be able to see our lives and our character as well.