Since we know nothing about how the two systems are powered and/or grounded, it would be a good idea to keep them isolated. A simple optoisolator should do the trick.

simulate this circuit – Schematic created using CircuitLab
The resistor values are selected based on how much current you want to flow in each side of the circuit.
On the input (LED) side, you generally want somewhere between 3 and 20 mA flowing through the LED. Verify this against the datasheet for the actual coupler you buy. Therefore, I selected 1 kΩ for R1, which allows 3 mA to flow at an input voltage of 5 V, given a forward drop of about 2 V on the LED: \$\frac{5 V - 2 V}{3 mA} = 1000 \Omega\$. This means that the input voltage could go as high as 20 V without damaging the LED. For higher voltages than that, you'll need a different value.
On the output (transistor) side, a relatively low current can drive a GPIO pin on an MCU. I arbitrarily selected ~1 mA. Assuming that the voltage drop across Q1 is no more than 0.6 V, this leads to a resistor value of \$\frac{3.3 V - 0.6 V}{1 mA} = 2700 \Omega\$. Again, this should work over a wide range of supply voltages coming from the MCU; adjust to taste.