In Islam, lying is haram (prohibited: to lie entails a sin, and to abstain from it enails good deeds). However, there are three circumstances in which a lie is allowed: for a husband to create love and tranqulity between himself and his wife, for one to settle disputes, and in war.
For a man to create harmony with his wife: One may lie to one’s wife in order to create peace and avoid arguementation–for example, if one’s wife asks “do I looks fat and ugly?”, woe to the one who says “yes”.
Beware that lies to steal property or rights are haram by consensus!
To settle disputes: When two argue and stop speaking to each other and so on, one may lie to bring them together–for example, tell them each, seperately “hey, you know, the other guy says you’re so awesome, you’re like, his hero man!” In this case, the action is mustahab and one receives rewards for it.
In war: in war, one may lie. For example, if captured as a prisoner of war, one may lie about Muslim armies, numbers, locations, strategies, etc. In this case, the action is fard, and must be carried out.
Wallahu ‘alim. When in doubt, ask people of knowledge.