Okay, space geeks... How close does an inhabited planet have to be for us to see the lights on its surface?

Likewise, how close does someone have to be to see ours?