Praise be to Allah, the Lord of the Worlds; and may His blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
Time is one of the greatest blessings about which a Muslim will be asked on The Day of Judgment.
Al-Thirmidhi reported that the Prophet (Sallallahu Alaihi wa Sallam) said: "A servant (person) will not move his feet on The Day of Judgment until he is asked about his life and how he spent it…."
Therefore, if you want to be successful, you have to spend time in the obedience of Allah, by learning His book, studying the Sunnah of his Prophet (Sallallahu Alaihi wa Sallam), and reading the books of the people of knowledge and whatever benefits you in this life and the hereafter. Also, keep company with pious people who will help you in righteousness, and exchange advice with them, and know that a person will be resurrected with whom he loves.
You have to be careful about these friendships ties through the internet. Most of those who establish such ties are either a disobedient people or non-Muslim ones.
The Prophet (Sallallahu Alaihi wa Sallam) said: "A person is on the religion of his friend, so you have to choose whom you befriend."
However, there is no harm on you to entertain yourself with some games that are free from prohibitions, i.e. free from, gambling and the like.
It is confirmed that the Prophet (Sallallahu Alaihi wa Sallam) said to one of the Companions: "O, Handhala, there should be a moment where you amuse yourself (with what is lawful) and a moment where you resort to serious matters."
Allah knows best.