There is no general rule followed to award 'Man of the match' award. The match officials decide it after analyzing performances of players through the match. Hence, the reason sometimes Man of the match award is given to any player from the losing team who delivered splendid performance.
Although formats like IPL ascribe points for every catch, wicket, sixes, fours and runs and the player with most points gets the 'Man of the match' award.