At first blush, I should think that most polarization is the result of a lack of knowledge or understanding. However, the question as phrased harbors a polarized viewpoint itself, giving us a choice between only one of two options; namely fear or lack of knowledge. I would submit that man's tendency to polarize himself towards certain extremes, from religion, to ideologies (in which I would include such things as religion, monogamy, racism, political affiliations or non-affiliations) has perhaps other causes apart from the two you have indicated. Man's tendency toward polarization or the clinging to a particular, usually shunted, view of the world can be affected by factors such as anger (the loss or murder of a loved one); personal experience (e.g., a bad first marriage); vocation (e.g., an agrarian would be more inclined to things that favor the management of the soil, which would extend to political policies, regional laws, irrigation, dominion over wildlife, and, in earlier days, an inclination to worship deities of the field such as Demeter and of the sun such as Apollo). Having said this, however, I believe that some of these attitudes are largely the result of one's knowledge or lack thereof. Many of our emotions are based upon how our mind interprets the data we perceive and the experiences we recollect. Three men looking at a microscopic slide of human tissue, for example, might have three different emotional reactions based upon their referent points in knowledge. One man, for example, might be a surgeon, another an artist and another a bus driver; the medical man might detect a breakthrough in medicine and hence be filled with a sense of joyous exaltation; the artist might feel a sense of aesthetic revulsion at the patterns and color the tissue suggests to him; and the bus driver might feel nothing but yawning indifference. Here we have three distinct emotions derived from three human beings witnessing the same stimuli from three different knowledge contexts, with the result being joy, revulsion and apathy. These emotional responses incline an individual to a particular way of feeling and thinking (the artist in the example might, presumeably, feel so revulsed as to wish to join an anti-"modern art" group; the doctor might now wish to join a group that champions public funding for medical advancement; the bus driver might be inclined to sign a petition not to waste any more of the tax payer's time with such unimportant experiments). Knowledge obviously in this reference would be highly contextual and would play a huge role in determining one's reaction to an event or stimuli and, perhaps even one's future actions. Probably the two causes you cite are interdependent; i.e., a lack of sufficient understanding or knowledge, can lead to fear which can, in turn, lead one to become polarized in his viewpoints, or join a group in which the authority of others makes him feel less insecure and afraid. And probably the other causes I listed are also interdependent with human understanding and knowledge. As Will Durant said:
We must not expect the world to improve much faster than ourselves. Perhaps, if we can broaden our borders with intelligent study, modest travel, and honest thought, if we can become conscious of the natural hunger and needs of other peoples, and sensitive to the varied beauties of many cultures and diverse lands, we shall not so readily plunge into competitive homicide, but shall find room in our hearts for a wider understanding and an almost universal sympathy.