As others have said. You don't seem to need the opto-isolator. So, feel free to remove it.
But I was currious, as to how it got there in the first place, hence this post.
I've been trying to clarify the confusion surrounding the opto-isolator.
Firstly, there seems to be errors, in the copying of the schematics from place to place. Maybe, by multiple people.
The (what I assume) original source (picture and links, at bottom of post), has the resistor to the opto-coupler, as a 200 Ohm resistor, NOT 1K.
Which ties in with what I, and other(s), have been saying in this thread. 1K is too big.
I suggested 330 Ohms, and said lower would be better. So, 200 Ohms, sounds good.
The reason for the opto-isolators, seems to be because the mcu could be 5V, or 3.3V (since they claim Raspberry PI compatibility), or some other voltage. Also, the two different power supplies (potentially very weak 3.3V) and the relay 5V supplies. Shouldn't be connected together at all, even as regards the grounds.
Because they could be at completely different (relative) potentials.
E.g. One is earthed, the other is floating, with a weak mains voltage biasing it (think cheap, not best of quality, USB 5V chargers, which can give you a slight tingle, if you touch the output, because you are earthed, and it is not, so potential differences, can occur).
The 8 relay board, needs, something like 600ma+, (8x 70ma relays, plus a bit of safety margin), which could easily be too much, for the (potentially) small, mcu power source. There seems to be a jumper option, to choose between combined and isolated supplies (details vague, so I'm partially guessing).
Schematic source:
http://wiki.sunfounder.cc/images/c/cb/8_Relay_Module_schematic.zipFrom page:
http://wiki.sunfounder.cc/index.php?title=8_Channel_5V_Relay_Moduletl;dr
In the (multiple ?) copying process. Details, such as 200 Ohms opto drive resistor, rather than 1K, and proper isolated supply rail techniques, seems to have been miscopied, or removed on purpose.