In Shakespeare's time, social status was incredibly important. The Elizabethan Age was a time of progress, and while there were still large differences in social class, people were beginning to have some hope of increasing their station. In Twelfth Night, there are many characters who are interested in increasing their social standing, such as Malvolio and Maria.
Malvolio is the the opposite of Feste -- Malvolio wears dark clothing and has no sense of humor, while Feste is the court jester and always has a festive air about him. When Maria forges the letter from Olivia to Malvolio, making Malvolio believe Olivia loves him, Malvolio ends up looking like a fool by wearing ridiculous clothing and acting inappropriately. Even though the two characters are initially completely different from each other, they are both members of a lower social class, and they both end up playing the role of a fool.