As several commenters have noted, water flows downstream, that is, water flows from a place that is upstream to a place that is downstream.
Metaphorically, then, what is upstream comes before what is downstream. In context, it may mean that what is upstream causes what is downstream.
"Social justice lies upstream from charity." Social justice leads to charity, or charity is the logical result of social justice. Without more context, it's difficult to determine what the writer was trying to say.
"Everything good lies upstream from us." I'd really have to see the context on that one. Absent context, I'd guess that he means that all the good that could happen is in the past, and so the future looks bleak and depressing. Whether the writer is speaking of his personal life, society, or what I have no idea. It's also possible that he means something entirely different, like there are all these good things upstream that are going to flow down to us in time. Or any of dozens of other readings. We'd really have to see the context.
"Tonak Pokhari, or simply the Fourth Lake lies upstream from the sacred lake of Gokyo in the Himalays." That sounds to me like a literal description of the geography of these lakes. Tonak Pokhari is at a higher altitude than Gokyo and the water therefore flows from the first to the second.