When something is "black and white," it means either that the answer is very clear, that there is a plain right and wrong answer, or that an individual is thinking in terms of absolutes. Thinking in terms of black and white can be useful in some situations, but generally speaking, acknowledging the many "gray," or in-between, areas possible in life, such as where a certain action could be right or wrong depending on the context, indicates a more mature way of thinking.
Saying something is black and white does not refer to literal colors. Instead, it is a metaphor representing two different extremes, or two opposites. Young children will often think in these extreme terms because they have not yet developed the nuanced cognitive skills required to see both sides of an issue. Children might get upset if they have to share a toy, for example; they see the toy as belonging to them, and have trouble understanding the benefits of sharing one's things with others.
In addition, stating that a thing is black and white might indicate that the meaning or the answer is clear. In some situations, a clear right or wrong may be clear; in this case, the situation is said to be black and white, implying that the solution is obvious. It does not require further debate and discussion in order to arrive at the correct answer. Of course, what is a clear solution to some people might not be the same to others, which is why it is rare that situations truly are abundantly clear without any gray area in the middle.
Describing the middle ground of a situation or question as "gray area" carries the metaphor even further. It refers to an area in which things get murkier or less clear, and where further questions arise. Depending on a person's perspective, a decision, answer, or viewpoint could be right or wrong, and it is important to recognize this throughout life. People who deal well with other people and behave more maturely in most situations are often better at recognizing the gray area, and finding the middle ground in discussions. This makes it possible to see both sides of the story before making a decision.