Measuring individual Voltage of the connected solar panel in series using I2C Protocol having GND in common as this get short circuited
Your problem apparently comes down to getting low-bandwidth telemetry from multiple devices, each floating at various potentials.

Opto-isolators are good for getting data across arbitrary potentials.  However, IIC protocol is not well suited for this.  This is due to the bi-directional nature of the SDA line.

A better choice would be using a UART in each device.  You could gang all the optos that drive the individual RX lines together on your side.  In other words, you broadcast the same data to all devices.  You then also OR the outputs of the TX optos together.  Any device can drive the ganged TX line (your RX line) low, and it floats high when no opto is activated.

You use a higher level protocol where each device has a unique address, and responds only to a request to that address.  In other words, it is up to the protocol to ensure that only one device is trying to send at a time.  Your code on the master device then polls each of the slave devices in a endless loop.