NASA and the European Space Agency have controlled a LEGO robot on Earth from the International Space Station using an experimental "interplanetary internet" system. The Disruption Tolerant Networking (DTN) protocol has been specifically developed to facilitate communications in high latency environments like space, and has successfully transmitted data between Earth and space in the past. The LEGO experiment was the most advanced demonstration of its capabilities yet, though, and was supposed to simulate an astronaut controlling a actual robotic rover on the surface of other planets.
DTN works by intelligently holding and resending data packets that would be lost using traditional networking protocols. NASA hopes to use the protocol to build a complex inter-planetary network made up of many satellites and relays in the future. For a simple-language explanation of the DTN protocol, check the video below.