Help identifying component on Sainsmart 4-Channel Relay board
These components** are opto-couplers.  Their purpose is to convey the digital signal while providing galvanic isolation.  If galvanic isolation is required, VCC and JD-VCC should come from separate power supplies, which are in turn isolated from each-other.

** U1, U3, U5, U7 in the schematic.

Galvanic isolation is used to: 


stop high voltage events from getting into vulnerable areas
block conducted EMI on the signal lines
allow the isolated parts of the circuit to float with respect to each-other


P.S.  critique of the schématique

For what it's worth, the schematic could have been drawn better.


Isolated grounds should have different symbols to make it more obvious that there are isolate grounds in the circuit.  Isolation barrier should be drawn as a line.
There are 2 connectors on the board with "J?" designators.
It's better to have a separate power connector for each of the isolated sides.  Where's the ground pin for the right side power supply?
No revision number.  No part number.