Answer: The tradition of casting lots is referenced several times in the Bible. Although they are thought to have been used in 1Samuel 14:40 - 42, when King Saul sought God's counsel, they were not. In this case, what was cast was not lots but rather the High Priest's Urim and Thummim used to render a decision.
The primary reason for casting lots was to render an impartial, unbiased decision on important matters. Once the lot was cast, no one could argue that the decision was the result of human intervention like nepotism, politics, favoritism, and so on.
The ancient practice of casting lots would be the same as throwing dice or flipping a coin we commonly use today. In ancient times, they used varying means to cast lots, depending on the place and local customs, such as coins, polished sticks, cards, dice, and so on.
What is particularly significant is the fact that, in ancient Israel, the High Priest did use from time to time the tradition of casting lots for important, uncertain decisions. It amounted to consulting God for the answer, as Proverbs states "The lot is cast into the lap, but its every decision is from the Lord" (Proverbs 16:33).
This impartial practice stops arguments and contentions between people (and no doubt could prevent them from occurring in the first place). The book of Proverbs states that "Casting lots causes contentions to cease, and keeps the mighty apart" (Proverbs 18:18).
The last recorded use of casting lots in the Bible is in Acts chapter 1. It occurred when the early church, knowing they needed someone to replace Judas Iscariot as an apostle, asked for God to select one of two men for the awesome responsibility of preaching the gospel.
Then they cast their lots; and the lot fell on Matthias, and he was numbered with the eleven apostles (Acts 1:26, HBFV).
Humans, for countless ages, have used mediums, readers of cards, palm readers and so on to help them make decisions and plan for the future. God condemns, as made abundantly clear in Deuteronomy 18, these occult practices.
There is nothing wrong, however, with a modern version of casting lots like flipping a coin to arrive at a decision or determine a winner. When done, however, it is important to remember that chance produces the outcome with no additional meaning attached to it.