Socket wiring to relay + Ardunio / Pi
The relay module shown appears to be the Sainsmart 4 channel relay module, or similar. 

If this is so, the SainSmart documentation shows the relay connections on the screw terminals:



The following connections would work - The neutral connections are optional, I prefer to disconnect both live and neutral of my appliances when I am experimenting. 



Alternatively, a DPDT type relay switches two sets of contacts per relay, so both live and neutral can be connected through, or disconnected, with a single control signal from the microcontroller for each relay:



Note: 

The Raspberry Pi will not be able to work with a relay board that expects a 5 Volt control signal. The RPi outputs 3.3 Volts on its GPIOs. One needs to ensure that the relay board being used can deal with the lower signal and supply voltages.