What does it really mean?

Dan 5:25-28 And this is the writing that was written, MENE, MENE, TEKEL, UPHARSIN. [26] This is the interpretation of the thing: MENE; God hath numbered thy kingdom, and finished it. [27] TEKEL; Thou art weighed in the balances, and art found wanting. [28] PERES; Thy kingdom is divided, and given to the Medes and Persians.

Clearly Daniel explains the meaning to King Belshazzar, but not entirely. He explains the it as follows:

MENE God hath numbered thy kingdom, and finished it.
TEKEL Thou art weighed in the balances, and art found wanting.
PERES Thy kingdom is divided, and given to the Medes and Persians.

In reality they already knew the words. Mene = "numbered." Tekel = "weighed." Peres = "divided."

The interesting thing, and our primary clue that there is indeed a deeper meaning, is that Daniel never explains why the word MENE is repeated. It is there two times. – Why?

It turns out that this was also a measure of weight. A Menah was 1,000 gerahs, a shekel was 20 gerahs (Exo. 30:13; Lev. 27:25; Num. 3:47; Num. 18:16; Eze. 45:12) and a Peres, a division or half, was ½ a Menah or 500 gerahs.

Word Value in Shekels Value in Gerahs
Mene 50 1,000
Mene 50 1,000
Tekel 1 20
Peres 25 500
Total 126 2,520

The total number of gerahs indicated by the LORD when He wrote on the wall of literal Babylon is exactly the same length of time (in years) as "The Times of the Gentiles." (See Volume II Study IV of Studies in the Scriptures) In other words, speaking prophetically of Mystic Babylon, Christendom, the prophecy is saying "When the Times of the Gentiles are up (after 2520 years) you will fall.""In that night was Belshazzar the king of the Chaldeans slain." Dan. 5:30

We are not alone in recognizing the meaning of MENE, MENE, TEKEL, UPHARSIN as indicating the total value of 2,520. While the following internet references may not have the same understanding of the Divine Plan as we share, they do recognize the hand writing on the wall was indicating 2,520.

The following list should NOT be considered as an endorsement of the views presented on these sites. We are simply showing that the value 2520 for the hand-writing on the wall is well known.
The fact is that some of these sites present thoughts not at all in harmony with Present Truth and might be considered by Bible Students as being rather bizarre. Again, the point we are making is simply that the literal understanding of the "handwriting on the wall" is understood outside the Bible Student movement.
How was the ancient City of Babylon taken?

"According to the famous Cyrus Cylinder inside the British Museum, Cyrus, a general of Darius, had his army dig trenches up stream depleting and rerouting the river so that his army could attack through the riverbed at night."

"Cyrus ... placed a portion of his army at the point where the river enters the city, and another body at the back of the place where it issues forth, with orders to march into the town by the bed of the stream, as soon as the water became shallow enough: he then himself drew off with the unwarlike portion of his host, and made for the place where [legendary former queen] Nitocris dug the basin for the river, where he did exactly what she had done formerly: he turned the Euphrates by a canal into the basin, which was then a marsh, on which the river sank to such an extent that the natural bed of the stream became fordable.

"Hereupon the Persians who had been left for the purpose at Babylon by the, river-side, entered the stream, which had now sunk so as to reach about midway up a man's thigh, and thus got into the town. Had the Babylonians been apprised of what Cyrus was about, or had they noticed their danger, they would never have allowed the Persians to enter the city, but would have destroyed them utterly; for they would have made fast all the street gates which gave access to the river, and mounting upon the walls along both sides of the stream, would so have caught the enemy, as it were, in a trap. But, as it was, the Persians came upon them by surprise and so took the city. Owing to the vast size of the place, the inhabitants of the central parts (as the residents at Babylon declare) long after the outer portions of the town were taken, knew nothing of what had chanced, but as they were engaged in a festival, continued dancing and reveling until they learnt about the capture. Such, then, were the circumstances of the first taking of Babylon." – Herodotus

The Fall of the literal ancient City of Babylon was
Typical of the Fall of Mystic Babylon (Christendom)

This describes the type. The antitype, the reality, the fall of Mystic Babylon, Christendom, is described as taking place under the sixth and seventh plagues. Or, more precisely, the fall of Mystic Babylon, Christendom, is brought about by all seven of the plagues. It is this portion which relates to the "handwriting on the wall" that is directly pointed to by plagues six and seven.

The sixth plague is the drying up of the Euphrates. (Rev. 16:12) This is a clear reference to the above description. By combining the description of the fall of ancient Babylon with the fall of Mystic Babylon we see the picture. When the drying up of the people supporting Christendom takes place, it falls. And according to Dan. 5:25-28, 30, this takes place at the end of the Times of the Gentiles, at the end of the 2520 years. – Remember, the purpose of plague 6 is to "go forth unto the kings of the earth and of the whole world, to gather them to the battle of that great day of God Almighty... And he gathered them together into a place called in the Hebrew tongue Armageddon." Rev. 16:14,16

The inference is clear. When the Times of the Gentiles are up (1914) it is the time for the seventh plague, Armageddon, to be poured out.