Joking around is encouraged in Islam, in a permissible way, in order to create sustainable bond and warmth in relation. This is encouraged especially among family members, relatives, friends, and among colleagues, classmates and so on (excluding the mixing of non-Mehrams, of course). Rasulullah sallAllaahu alaihi wasallam do jokes around whenever he’s being in the company of his wives and the Companions. Rasulullah sallAllaahu alaihi wasallam said: ‘No old woman will ever enter heaven.’ The woman turned away crying. Rasulullah sallAllaahu alaihi wasallam said to those nearby: ‘Tell her that no woman goes into heaven as an old woman.’ He then read the Qur’anic verses: “We have created (their Companions) of special creation, And made them virgin - pure (and undefiled), “ – Surah Al- Waqiah (56: 35-36). Sadly that these days, the jokes revolves around making fun of people, belittling them, mocking at their physics, calling nicknames, more often than not involve backbiting, and most of the time, lies often involved to spice things up a little bit.
Islam is perfect Masha’Allaah that it gives us guidance, a perfect, fine and transparent blueprint for EVERY SINGLE thing for us to apply in our daily life. And that guidance described completely in Qur’anul Kareem. Subhan’Allaah. Even topics or guidelines for any single act, as trivial (perhaps to some) as making jokes. Now, imagine, all of our lives, how many foul jokes we’ve made on people, and have we ever consider (if we do have some conscience) how the other person actually feels? And all that we care about is being a famous comedian in the crowd.
Anas ibn Malik reports: “A man asked the Prophet to give him a mount. The Prophet said to him: ‘I will give you a she-camel’s baby.’ The man said: ‘What use do I have for a she-camel’s baby?’ The Prophet said: ‘What camel is not born to a she-camel?’” (Related by Ahmad, Al-Tirmidhi, Abu Dawood and Al-Bukhari in Al-Adab Al-Mufrad). Here we see the Prophet making a joke, as he tells the man who requests a mount that he would give him a she-camel’s son. The man takes it literally and thinks that the Prophet is giving him only a young camel that is not fit to travel any distance carrying a man on his back. But the Prophet explains that every camel is the baby of a she-camel 
Joking, Laughing and Having Fun the Shariah Way
So, what are the permissible ways in making jokes in Islam? As long as it DOES NOT…
i) make fun of any aspect of Islam. This involves making jokes of the Qur’anic verses, The Blessed Prophets, Malaikats, the commandments of Allaah (making fun of covering aurats, following Sunnah). The most feared of all as this may nullify one’s belief and can make a person becomes a Kafir (Sheikh Al-‘Uthaymeen). Allaah Ta’ala says,” And if you ask them, they will surely say, "We were only conversing and playing." Say, "Is it Allaah and His verses and His Messenger that you were mocking?” Make no excuse; you have disbelieved after your belief. If We pardon one faction of you - We will punish another faction because they were criminals.”- Surah At-Tawbah (9:65-66)
ii) jokes pertaining Haram matters
iii) make us invent lies after lies. We often do this whenever we wish for our children to listen to us. Rasulullah sallAllaahu alaihi wasallam): “Do you joke with us?” Rasulullah sallAllaahu alaihi wasallam replied: “I do, but I only say that which is true” (Al-Bukhari, Tirmidhi) and in another hadith, Rasulullah sallAllaahu alaihi wasallam said, “Woe to the one who speaks and tells a lie in order to make the people laugh at it. Woe to him. Then again, woe to him.”(Al-Tirmidhi)
iv) ridicule people. And Allaah Ta’ala says,” “O you who have believed, let not a people ridicule [another] people; perhaps they may be better than them; nor let women ridicule [other] women; perhaps they may be better than them. And do not insult one another and do not call each other by [offensive] nicknames. Wretched is the name of disobedience after [one's] faith. And whoever does not repent - then it is those who are the wrongdoers.”-Surah Al-Hujurat (49:11). So, how many times have we did make fun of people with physical disabilities, with speech impairment, and so on?
v) make us feel glad/ happy to see others being afflicted with misfortune. Rasulullah sallAllaahu alaihi wasallam said, “Do not express malicious joy towards your brother’s misfortune, for Allaah may have mercy on him and you may be stricken by the thing you made fun of.” (Al-Tirmidhi). Rasulullah sallAllaahu alaihi wasallam said,” ‘It is not permissible for a Muslim to frighten another Muslim.’” (Narrated by Abu Dawood).
“Some people make fun of a person’s appearance, manner of walking or vehicle. But there is the fear that Allaah may requite the one who makes fun of others because of that. The Prophet (peace and blessings of Allaah be upon him) said, “Do not express malicious joy towards your brother’s misfortune, for Allaah may have mercy on him and you may be stricken by the thing you made fun of.” (Narrated by al-Tirmidhi).”
vi) involve backbiting. “(Backbiting is) your mentioning about your brother something that he dislikes.” (Muslim). According to Ibn Kathir “What is meant here is looking down on them, belittling them or making fun of them. This is haraam and is counted as one of the characteristics of the hypocrites.”
vii) lead us to having excessive laughter while joking around. Rasulullah sallAllaahu alaihi wasallam said: “Do not laugh too much, for laughing too much deadens the heart.” (Sahih al-Jaami). ‘Umar ibn al-Khattaab radi’Allaahu anhu said: “Whoever laughs too much or jokes too much loses respect, and whoever persists in doing something will be known for it.”
viii) the time is right. Sufyaan ibn ‘Uyaynah radi’Allaahu anhu said, “ It (joking) is Sunnah, but only for those who know how to do it and do it at the appropriate time.”. Some of us jokes around, uttering foul words while having food.. imagine the du'a we're making while having food and once we have the food, it will be part of us. Sometimes we jokes around in serious matters too. May Allaah Ta'ala forgive us Aameen.
ix) no foul language is being used. Rasulullah sallAllaahu alaihi wasallam said: “The Muslim does not slander, curse, speak obscenely or speak rudely.” (Al-Tirmidhi).
x) we do not discriminate them based on status. We make fun of politicians, ‘ulama, teachers, our relatives (who are older than us), or even those who are younger than us. ‘Umar ibn ‘Abd al-‘Azeez said: “Fear joking, for it is folly and generates grudges.”
It’s a constant challenge every day to be around people who are not Deen-inclined and walking away is often the best thing to do rather than sit around, swallow the nonsense and getting sins for free. We are encouraged to choose righteous companions, those who keeps reminding us of Allaah Ta’ala, who will keep and help us in being steadfast in our ibadah, and whose examples we can follow.
A reminder for myself, first and foremost, Allaah knows best and I know nothing, Alhamdulillah.
 Conditions of permissible joking- Fatwa No.22170, Abd al-Malik al-Qaasim.http://islamqa.info/en/22170. Accessed on 13th February 2014.
 Frightening a Muslim, Backbiting, Truth and Lies, Safeguarding the TongueBahishti Zewar (Heavenly Ornaments), Maulana Muhammad Ashraf Ali Thanvi (2009). pp 491,492,457. Darul Ishaat Urdu Bazaar, Karachi.
 11 Rules in Islam On Joking, Muslimah, Sept 14th,http://amuslimsistermaria200327.wordpress.com/2009/09/14/15-rules-in-islam-on-joking/. Accessed on 13th February 2014.