We may walk either in light or in darkness. God is light. But if we walk in the light, as he is in the light, we have fellowship one with another, and the blood of Jesus Christ his son cleanses us from all sin. The language in this passage is not metaphorical. He asserts that God is light, and contrasts this light to darkness.
Darkness is the absence of light.
God is light with no darkness intermixed. However, if we walk in God's light as Jesus does, we do indeed have perfect partnership with God and with each other and the blood of Jesus cleanses us from all sin. We have fellowship with each other because we are each individually full of light and belong to the light. Since God is light and is also love, when we are full of light we manifest God's love, the source of our fellowship. As we walk in the light, Jesus' blood also cleanses us from sin.