Is Curley's wife important to the plot in any way?
The role of Curley's wife is basically to steer the plot towards the real, inner problem of the story: That it is virtually impossible for George and Lennie to achieve their American Dream. Their obstacles far out number their dreams. Moreover, the biggest of all obstacles may be Lennie, himself.
We know that Curley's wife is problematic: She is a flirt that overdresses and tries to make herself look sensual just for the sake of getting attention. When she sees Lennie, she is immediately attracted to his size and looks, considering that her own husband is quite puny in comparison. Lennie's size is also a point of jealousy in Curley, himself.
However, that is not the biggest of Lennie's problems. His strength is uncontrollable,as well as his anger. He is a good man with a terrible inability to control his body and his amazing strength. He kills animals accidentally trying to pet them. Equally, when he is trying to caress Curley's wife, he ends up accidentally killing her. This is the last straw. There is no way that the men can now achieve the dream of going away and building their own farm.
When Lennie is chased by the lynch mob that assembles after the discovery of Curley's wife's body, George prefers to shoot and kill Lennie so that his death is instant. Otherwise, he would have been tortured and humiliated, prior to being killed, by Curley's men. Everything is over for the two men at this point. Therefore, the role of Curley's wife is simply to accelerate what seems to be an inevitable tragedy that would end the dreams of George and Lennie.