This is an important question. The original Hebrew is in the singular which is accurately reflected in the Authorised Version "Thou shalt not..." You is plural whereas Thou is singular. It does not say It does not say, "Do not kill" but "Thou shalt not kill".
Jewish writers and Rabbis have given many answers to this such as that they stood 'as one person of one heart', see here and here and here. For instance the first century AD Jewish writer Philo writes: "But why are the commandments formulated in the singular (Thou), when a multitude was present? Readers of the Holy Scriptures may learn from this that each individual who keeps the law and obeys God is as precious as the whole Nation, nay more, as the whole world. Another reason is that commands and prohibitions are more impressive if addressed to each individual in the audience." It highlights individual responsibility.
No doubt there is also something to be said for the fact that Israel is seen as the son of God, see here.
John Willison asks:
Q. Why doth this and the rest of the commands still run in the singular number, Thou, and not You?
A. Because God would have every man to notice the directions thereof as particularly as if they were spoken to himself by name.
It is "thou" not "ye," because each person is addressed separately as a distinct moral agent responsible to God for keeping the law. Willison also notes: "The Decalogue, or Ten Commandments, which were solemnly delivered to the people of Israel from Mount Sinai, do contain the moral law; being a fixed and perpetual rule of righteousness, which God hath given to be observed by all mankind, in all ages and periods, to the end of the world." The Larger Catechism reminds us:
"That the law is perfect, and bindeth every one to full conformity in the whole man unto the righteousness thereof, and unto entire obedience forever; so as to require the utmost perfection of every duty, and to forbid the least degree of every sin."
The puritan Thomas Watson answers our question:
"Because the commandment concerns every one, and God would have each one take it as spoken to him by name. Though we are forward to take privileges to ourselves, yet we are apt to shift off duties from ourselves to others; therefore the commandment is in the second person, Thou and Thou, that every one may know that it is spoken to him, as it were, by name." Some have said that we ought to put our own name as it were into the commandment in order to recognise our own responsibility.
James Ussher in his Body of Divinity answers the question as to why the commandments are addressed in the singular:
1. Because God being without partiality, speaketh to all men alike; as well the rich as poor, high as low.
2. Because no man should put the commandments of God from himself, as though they did not concern him: but every particular man should apply them to himself as well as if God had spoken to him by name. Whence we gather, that God wisely preventeth a common abuse amongst men: which is to esteem that which is spoken unto all men, to be (as it were) spoken to none. As you shall have it common amongst men to say and confess, that God is just and merciful, and that he commandeth this, and forbiddeth that: and yet they usually so behave themselves, that they shift the matter to the general, as if it did not belong unto them in particular; and as if they
notwithstanding might live as they list. And therefore every man is to judge and esteem that God speaketh in the law to him in particular; and is accordingly to be affected therewith.
We are addressed individually by God as sovereign. This is because as the puritan John Dod put it "self [is] our chief idol: So that every carnal man sets up himself, he does nothing but seek and serve himself and therefore is his own idol, and another god to himself".
There is also intimacy in the individual singular and personal address "thou". Thomas Boston shows that when we see the context of redemption in the Preface to the Ten Commandments we see the commandments in their correct light for the believer. "The ten commandments were not given to the Israelites as a covenant of works, but in the way of the covenant of grace, and under that covert. Ye saw it was Jesus the Mediator that spoke these, Heb. 12:24-26. Amongst all the reasons there is not one of terror; but the sweet savour of gospel-grace."
"All true obedience to the ten commandments now must run in the channel of the covenant of grace, being directed to God as our God in that covenant, Deut. 28:58. This is to fear that glorious and fearful name, THE LORD THY GOD. And so legal obedience is no obedience at all. This obedience is performed not for righteousness, but to testify our love to the Lord our Righteousness; not in our own strength, but in that of our Lord God and Redeemer; not to be accepted for its own worth, but for the sake of a Redeemer’s merits; not out of fear of hell, or hope to purchase heaven, but out of love and gratitude to him who has delivered us from hell, and purchased heaven and everlasting happiness for us."
"So far is the state of the saints from being a state of sinful liberty, that there are none so strongly bound to obedience as they, and that by the strongest of all bonds, those of love and gratitude, arising from the amazing and wonderful obedience and satisfaction which he has performed for them. So that the love of Christ will sweetly and powerfully constrain them to run the way of his commandments; for his commandments are not grievous, and in the keeping of them is a great reward. They will love him, because he has first loved them; and his love has flowed out to them in the crimson streams of their dear Redeemer’s blood, by which their sins are expiated, and their guilt atoned. And those to whom much is forgiven, will certainly love much."
"God might have required of us obedience by his mere will, without giving any other reason; and in that case, men had been bound to give it at their peril. But how much sweeter is the command, and agreeable what he demands, when he enforces the equirement he makes by such engaging motives, as that he is the Lord, a being possessed of all possible perfection, of every glorious attribute and excellency, the author of all other beings, and all the amiable qualities and attracting xcellencies of which they are possessed; that he is our God, related to us by a covenant, which he hath made with his own Son as our Surety and Saviour, and which is brought near to us in the gospel, that we may enter into the bond thereof, and the righteousness of which is brought near unto us, who are stout-hearted and far from righteousness, that we may accept thereof, and so be delivered from condemnation and wrath? How agreeable and ravishing is it to reflect, that he incites and prompts us to obedience, not by the authority of his absolute sovereignty over us, and undoubted propriety in us, but by the inviting and attracting consideration of the great deliverance he has wrought for us, of which the deliverance from the Egyptian bondage was a bright type!
Can we reflect on the great salvation wrought for us by Jesus Christ, by which we were saved from all the horrors of sin and hell, rescued from the power of Satan, and delivered from the present evil world, and the pollutions thereof; can we reflect on these great and glorious benefits, which afford astonishment to men and angels, and our hearts not glow with the warmest fire of love and gratitude to him who hath done such excellent things for us? Can we hesitate a moment to say, good is thy will, O God, just and holy are thy laws, and we will cheerfully obey what thou commandest us?"
We wonder why the modern versions see fit to obliterate the fact that we are personally and individually addressed in the commandments. They translate it as "you" and not "thou". Yet when we think that the Ten Commandments that were written by the finger of God and that He wrote in the singular what a fearful thing it is to alter this. The Lord also commanded Moses to keep the second set of Ten Commandments safe in the ark for a perpetual testimony (Deut 10:5). Does this not give particular reverence and care for God's written words? Why then have modern versions showed such contempt for this way in which God makes His sovereign will known?
There is in the Authorised Version a Bible that contains the Ten Commandments, the Lord’s Prayer and the 23rd Psalm as the man in the street knows them only. There is a Bible that carries a weight of authority and stirs a wealth of association for a significant proportion of our population. It is a Bible which alone addresses them as singular and as individuals in the way that God did at Mount Sinai.