Especially if we put together the parallel accounts of the giving of the Ten Commandments in Exodus and Deuteronomy, the Bible text itself is quite clear that what was written on the stone tablets was the section commonly known as the Ten Commandments, or the Decalogue: Exodus 20:2-17 or its variant in Deuteronomy 5:6-21.
Because these two different versions of the Ten Commandments exist in the Bible, we cannot say exactly what words were written on the two tablets. But we can say that it was a version of these Ten Commandments.
1. God spoke the Ten Commandments directly to the people from the mountain.
First, these were the words that God spoke directly to the people. The rest of the commandments and instructions were spoken by God to Moses, who was charged to relay them to the Israelites.
Here are the introductions and follow-ups to the giving of the Ten Commandments in Exodus and Deuteronomy.
Exodus:
Then God spoke all these words: [The Ten Commandments are given.] When all the people witnessed the thunder and lightning, the sound of the trumpet, and the mountain smoking, they were afraid and trembled and stood at a distance, and said to Moses, "You speak to us, and we will listen; but do not let God speak to us, or we will die." (Exodus 20:1, 18-19)
Deuteronomy:
Moses convened all Israel, and said to them:
Hear, O Israel, the statutes and ordinances that I am addressing to you today; you shall learn them and observe them diligently. The Lord our God made a covenant with us at Horeb. Not with our ancestors did the Lord make this covenant, but with us, who are all of us here alive today. The Lord spoke with you face to face at the mountain, out of the fire. (At that time I was standing between the Lord and you to declare to you the words of the Lord; for you were afraid because of the fire and did not go up the mountain.) And he said: [The Ten Commandments are given.] These words the Lord spoke with a loud voice to your whole assembly at the mountain, out of the fire, the cloud, and the thick darkness, and he added no more. (Deuteronomy 5:1-5, 22, italics added)
Though the Deuteronomy account fudges it a bit, speaking of Moses as standing between the Lord and the people and declaring the Lord's words to them, it is quite clear from the rest of the account that the people heard the Lord's own voice speaking the Ten Commandments. According to the Exodus account, it was after the Lord spoke these words that the people implored Moses to stand between them and God in order to hear God's words for them and deliver them to the people. This is most likely what the "fudging" in the Deuteronomy account is all about.
2. The rest of the commandments in Exodus were spoken by God to Moses, who was enjoined to relay them to the people.
After the giving of the Ten Commandments in Exodus 20, and the people's imploring Moses not to let God speak to them directly anymore, God continued giving commandments to Moses.
The Lord said to Moses: Thus you shall say to the Israelites: "You have seen for yourselves that I spoke with you from heaven. You shall not make gods of silver alongside me, nor shall you make for yourselves gods of gold . . . ." (Exodus 20:22-23, italics added)
This marks the beginning of commandments given by God to Moses, who was to record them and relay them to the people. These commandments cover not only the rest of Exodus 20 all the way through Exodus 23, but also the directions for the construction of and worship in the Tabernacle in Exodus 25-31. These additional instructions from God end in this statement:
When God finished speaking with Moses on Mount Sinai, he gave him the two tablets of the covenant, tablets of stone, written with the finger of God. (Exodus 31:18)
Clearly, there were not over ten chapters worth of commandments and instructions written on the two tablets. We know this not only based on common sense (that much text could not possibly fit!), but also from several plain statements in the text itself about what was written on the tablets, which are covered in the last section below.
The Deuteronomy account states even more explicitly than the Exodus account that after the people heard the Ten Commandments in God's own voice from the mountain, and implored Moses to have God speak to him instead of directly to the people, that God heeded the people's request, and gave the rest of the commandments and instructions to Moses to be conveyed to the people. This is written in the voice of Moses speaking to the people:
The Lord heard your words when you spoke to me, and the Lord said to me: "I have heard the words of this people, which they have spoken to you; they are right in all that they have spoken. If only they had such a mind as this, to fear me and to keep all my commandments always, so that it might go well with them and with their children forever! Go say to them, 'Return to your tents.' But you, stand here by me, and I will tell you all the commandments, the statutes, and the ordinances, that you shall teach them, so that they may do them in the land that I am giving them to possess." (Deuteronomy 5:28-31)
3. The text itself says that what was written on the two tablets was the Ten Commandments.
Aside from the problem of exactly which version of the Ten Commandments was written on the two tablets, we don't have to speculate about what was written on them because the text itself tells us.
After the entire Exodus account of the giving of the Ten Commandments, including the debacle of the golden calf and the making of the second set of tablets to replace the first set that Moses had broken, the text says:
The Lord said to Moses: Write these words; in accordance with these words I have made a covenant with you and with Israel. He was there with the Lord forty days and forty nights; he neither ate bread nor drank water. And he wrote on the tablets the words of the covenant, the ten commandments. (Exodus 34:27-28)
(Other passages, such as Exodus 31:18, make it clear that the "he" who wrote the words of the covenant on the tablets was not Moses, but the Lord.)
The Deuteronomy account says the same thing, both before and after the giving of the Ten Commandments.
Before:
Then the Lord spoke to you out of the fire. You heard the sound of words but saw no form; there was only a voice. He declared to you his covenant, which he charged you to observe, that is, the ten commandments; and he wrote them on two stone tablets. (Deuteronomy 4:12-13)
After:
So I made an ark of acacia wood, cut two tablets of stone like the former ones, and went up the mountain with the two tablets in my hand. Then he wrote on the tablets the same words as before, the ten commandments that the Lord had spoken to you on the mountain out of the fire on the day of the assembly; and the Lord gave them to me. So I turned and came down from the mountain, and put the tablets in the ark that I had made; and there they are, as the Lord commanded me. (Deuteronomy 10:3-5, italics added)
This final quote, especially, makes it crystal clear that the words written on the tablets were the Ten Commandments that the Lord had spoken directly to the people from the mountain.
Note that although the words used in the original in these passages are commonly translated as "the ten commandments," the Hebrew literally translates as "the ten words." However, the Hebrew word for "word" is very versatile, and "commandments" is a valid translation—and probably the best translation—in this context.
The Bible text itself, then, makes it very clear that what was written on the two tablets, both the first set and the second set, was the Ten Commandments as traditionally understood. The rest of the commandments and instructions given by God on Mount Sinai were given to Moses to be conveyed by him to the people, and were recorded separately by Moses.