Sending data over two independently powered arduinos
It's ok if the distance between the two devices are not too big. (couple meters)

Since the valid logic level (voltage) ranges are pretty wide a small difference won't affect the operation of the devices. Arduino uses TTL (5V) logic so let's see the level diagrams:



If you see the output level ranges (on the right) are more strict than on the input side (on left) so the logic value remains valid even if a small voltage drop or noise occurs on the wire.

Make sure you won't connect two outputs directly since it can damage the microcontrollers. Connecting two inputs are totally safe.

EDIT: If you want to cover longer distances you need to use a balanced line  e.g. differential I/O-s, RS-485 or CAN. These are not default Arduino features so you'll need additional electronic to use them.