The literal difference between these sentences is simply one of time limiting. "What was the most painful experience you have ever experienced as a mother" would be "from the time you became a mother until now, what was your most painful experience?" — if you choose to interpret the questions completely literally.
However, when people ask these questions, there is more than likely an extra nuance implied with these "as" clauses. "What was the most painful experience you have ever experienced as a mother" has the implied limitation that the painful experiences you're interested in are ones that have to do in some way with motherhood (or, for the "as a wife" example, married life). For instance, they might be looking specifically for conflicts with your children or partner, or times when your children or partner were seriously ill or upset; and even if you, for instance, lost your arm in an accident during your day job during that time, the asker probably isn't interested in that unless it specifically has to do with motherhood (or married life).