I am going to address the question in terms of emotional pain, because the role of physical pain is a matter of science and physical health, not really a literary, psychological, or philosophical matter.
So, why do we need emotional pain and difficulty in our lives? I believe that if we were always happy and everything were easy, we would not know we were happy or how good we had it, and I also believe we would not grow, within ourselves, in our relationships with others, or in our efforts to make a better world.
In The Giver, you will notice that drugs are necessary to inhibit people's pain and the rules are meant to do away with difficulty, particularly the difficulties of choice and inequity. We can infer that one of the author's points is that these are a natural part of being human and that we interfere with these natural conditions at our peril.
Why would we ever do anything if we were pain free emotionally all the time? Could we know we were happy without feelings of sadness sometimes? Can we love another if there are no bumps in the road? It would not even matter whom we love, so the richness of choice would no longer exist. If everyone is emotionally pain free, I do not think we can achieve maturity, which means learning how to live with ourselves and others no matter what our emotional temperature is. Pain gives us empathy, which helps us to understand and exist with others. A pain free condition implies that we would not care enough to work on that growth. Pain also is responsible for the creation of great art and beauty. People would not paint, would not create music, or write novels without having had pain in their lives.
What would ever change if there were no difficulties in life? A difficulty is nothing but a challenge. Without challenge, we would never invent anything, would never go anywhere, would never learn. My guess is that your deepest learning occurs when you must struggle. I know that is true for me. Inventions emerge from difficulties. The building blocks of civilization rest on challenges. How do we get from here to there? We build a road or a bridge or a canal. How do we prevent a flood? We build a dam (or an ark.) How do we remain safe and secure from the elements? We build houses. We need our difficulties.
In The Giver, the lack of color is really a metaphor for a lack of pain and difficulty. Without color, we have no pain, but we have no pleasure. We have no drive to create or to grow. Without color, we have no difficulty, but we have no motivation to make the world a better place. Without color, the world is blacks and whites and grays, a bleak world, lacking the richness and beauty that we need.