Actually, given that the RPi is powering the board (via the two connections to the Voltage source in the circle labelled Pi 5v) a lack of a common ground reference for the signal 0V-3.3V is not the issue in this case - unless the wiring is not actually what is shown here.
However I think @Milliways is on the ball about problems with drive to the LED in the opto-coupler.
(You did wire your external circuitry to the COMM {Common} and NO {Normally Open} terminals didn't you so that the circuit is switched off when the relay is not energised? Using the NC {Normally Closed} contact if present, instead of the NO one will invert the switching action!)
If you are committed to using this relay module then you will want to use an NPN transistor to drive the LED, connect the collector to the cathode of the LED, the emitter to the ground rail and the base to the GPIO pin via a, say 1K resistor - you will want to set the GPIO pin to output mode and to have the internal PULL-UP enabled - which will cause the GPIO pin to rise to ~3.3V when it is programmed to be on and provide enough current to switch the new transistor (and the LED in the opto-isolator, the photo-MOSFET it is coupled to, the external transistor and finally the relay) on.
However @Milliways is also spot on about this being a lot of extra gubbins that you do not need and an optimum solution would be a different unit that is better suited to the RPi case.
The only reason that you might need to go in this otherwise unduly complex manner is if the Relay is being used, and is suitable for such use, to switch Mains A.C. voltages AND the opto-isolator provides the minimum 2 x 3mm (i.e. 6mm) air-gap between the Mains-voltage and the Isolated (the RPi) sides of the circuit. This is to provide the double-isolation that is a requirement for the safety of anybody who might touch any part of the isolated side.
Sadly I have seen a great deal of Far-Eastern manufactured units that claim to be able to switch Mains voltages but are designed in such a way that there is no possibility that they can satisfy the safety requirements of European (and American) markets - such units can kill if used incorrectly {i.e. outside of a totally closed off unit with controls that themselves can provide the isolation needed and connections that are inaccessible when the unit is connected to Main Voltage}!
From what I can see I think that the unit you have linked to does not appear to meet those sort of standards.
Update:
I have tracked down one datasheet for the type of opto-isolator and I see that with a forward current through the LED of 5mA and a Vce of 5V across the transistor the quoted transfer figure is a minimum of 50% and a maximum of 600% - i.e. 2.5 to 30mA will flow in the Collector-Emitter circuit and thus the base of the output transistor. BTW the schematic is wrong - it shows:
- a photo-MOSFET whereas the device actually is a photo-BiPolar transistor
- the visible indicator LED ("IN1") is missing - it is in series with the one inside the opto-isolator
- the series resistor between the emitter of the photo-transistor and the base of the output transistor is shown as 1000 when it is actually 510 ohms.
When I tested it with the pi, it worked well
andWhen i connected it to the pi it didn't work properly