We actually never do learn the cause of Olivia's brother's death. Instead, we learn that her father died a year ago and that her brother died shortly after that. What seems more important to Shakespeare is to assert how foolish Olivia's behavior concerning her brother is. We learn in the opening scene from Duke Orsino's servant Valentine that Olivia has vowed to grieve for her brother for the next seven years. During that time, she will never go into society except veiled, plus cry daily in her chamber. The irony is that indulging in such prolonged grief is very excessive and rather foolish. Widows continued to wear veils after their husband's death, but only for one to two years. Olivia is not a widow, but rather a sister who has now become orphaned and even lost her brother as her guardian.
Feste in particular declares Olivia's behavior to be foolish. When Olivia orders that Feste be taken away out of anger because he was away from her household for so long, Feste twists her words around and commands that Olivia, the fool, be taken away instead. He then proves her a fool by stating that her deceased brother must be in hell, and when she retorts that he is in heaven, he states it is foolish to mourn so for a soul that is in heaven, as we see in his lines, "The more fool, madonna, to mourn for your brother's soul being in heaven. Take away the fool, gentleman" (I.v.64-65). Hence we see that the cause of Olivia's brother's death is not important to Shakespeare, and so we never learn about the cause. Instead, Shakespeare is using Olivia's mourning to comment on foolish behavior.