If a girl is raped as a child and thereby loses her virginity, then that would make marriage difficult for her later if her future husband values virginity as very important. What is Islams view/solution for this?
I know of no technical Islamic solution for such a situation. There is, however, a spiritual or common sense solution that I am sure many women in such a position already know. A man who firmly believes in human dignity and who sees her as a person rather than an object, and who is willing to think the best of others, will accept her explanation and will not count it against her even if she has no proof she was raped. Of course, many “Muslim” cultures will consider marrying such a woman a questionable thing. This is a case where the most religious can be the most open-minded.
Cultural Muslims who know little about religion and spirituality will judge things according to their cultural traditions (which often value virginity very highly). Spiritual and devout Muslims will judge things according to their religion’s spiritual ideals. From a spiritual perspective, if such a woman’s present manners and reputation support her story, then her lack of virginity is going to be a complete non-issue.
She must share the fact of her lack of virginity with suitors before the marriage, but after she judges that the suitor is worth trusting. She can try to find out each suitor’s mindset and personality. If she discovers that a man is narrow-minded and judges things mostly by cultural tradition rather than spiritual ideals, that is a good indication that she should reject him without sharing her story. Sharing that story puts her in a very vulnerable position (if the man talks to others about it).
So it just depends on the particular man. After getting to know a suitor and speaking to him many times perhaps she will be able to judge whether he is worth trusting. If he seems open-minded and pious, then that indicates that he might be the type of person who will not mind her lack of virginity and who will be willing to accept her as she is.