As for what is meant by "water and blood", the key is v. 6 which states that "Jesus Christ came (elthón) by water and blood, not with water only, but with water and blood". It is interesting that a specific denial is expressed towards a view that he came by water alone, and if docetism is what is being attacked in the letter (at least in part), then this could mean that Jesus did not come by baptism (= water) alone as some docetists believed (i.e. the idea that the heavenly Christ descended and entered Jesus at his baptism), but also in the flesh (= blood), such that "Jesus the Chrst has come (eléluthota) in the flesh (en sarki)" (1 John 4:2), i.e. that he was human physically. It is also noteworthy that at his baptism, water and Spirit (in the form of a dove, John 1:32-33) was present, and at his crucifixion, water and blood were present (John 19:34). But the passage most specifically alludes to the witnesses mentioned by Jesus as testifying to his status as Christ:
"If I testify about myself, my testimony is not valid. There is another who testifies in my favor, and I know that his testimony about me is valid. You have sent to John and he has testified to the truth. Not that I accept human testimony; but I mention it that you may be saved. John was a lamp that burned and gave light, and you chose for a time to enjoy his light. I have testimony weightier than that of John. For the very work that the Father has given me to finish, and which I am doing, testifies that the Father has sent me. And the Father who sent me has himself testified concerning me. You have never heard his voice nor seen his form, nor does his word dwell in you, for you do not believe the one he sent. You diligently study the Scriptures because you think that by them you possess eternal life. These are the Scriptures that testify about me, yet you refuse to come to me to have life" (John 5:31-40).
Here the topic is the same....the question is testimony about whether Jesus was sent by God as the Christ. Jesus also mentions one human witness and three non-human witnesses, but unlike in 1 John, the three non-human witnesses are (1) the work commissioned to Jesus, (2) the Father himself, and (3) the Scriptures. 1 John mentions that, like John, there are human witnesses but that God has higher testimony: "We accept the testimony of human witnesses, but God's testimony is much greater, and this is God's testimony" (1 John 5:8). It is possible that the author has loaded double meaning to the words "water, blood, and spirit" and intends an enduring sacramental sense (which continue to testify to Jesus, namely, baptism, the Last Supper, and the Spirit in the church), but the exact sense is uncertain.
As for the agreement between the three witnesses, I think this clearly refers to the OT legal requirements on witnesses: "A single witness cannot suffice to convict a man of a crime or offense of any kind; whatever the subject, the evidence of two witnesses or three is required to sustain the charge" (Deuteronomy 19:15). This law is alluded to specifically in John: "If I judge, my judgment will be sound because I am not alone. The one who sent me is with me; and in your Law it is written that the testimony of two witnesses is valid. I may be testifying on my own behalf but the Father who sent me is my witness too" (John 8:16-18). There may be a loose connection however with the proto-gnostic concept of making plurality into a unity (cf. Thomas 22:4, 30:1, 106:1).