In many ways, this is the seminal mitzvah of the Torah. In the Sifra, Rabbi Akiva calls this the great principle of Torah. In Talmud Shabbos (31a), Hillel paraphrases the idea to say that we should not do to others that which we dislike, calling that the entirety of Torah. Most world religions have adopted similar ideals, calling it “the golden rule.”
If we love the next person as we love ourselves, then we are truly happy for our friend’s good fortune, not selfishly wishing that it were ours. And it would never occur to us to do something detrimental to another person! If we truly loved our neighbors as ourselves, there would be no robbery, no adultery, no murder, no gossip, no slander, etc. It’s easy to see why this is such an important Torah principle.
In the Sifra, where Rabbi Akiva calls this mitzvah a primary idea of the Torah, the scholar Ben Azzai proposes a different verse as greater still: Genesis 5:1, which says, “This is the book of the generations of Adam.” With “loving our neighbor as ourselves,” we may occasionally justify hurting others because of our differences, rationalizing that they fail to meet our definition of a “neighbor.” “This is the book of the generations of Adam” reminds us that all of us – Jew, Christian, Muslim, black, white, yellow, red, brown, you name it – we’re all descended from the same first parents and all of us together are one big family of man.
The reason for this mitzvah is obvious: so that we should treat one another well. This also leads to reciprocity: if Fred treats Bob well, Bob is more likely to treat Fred well, and vice versa.
This mitzvah applies to both men and women in all times and places. It is discussed in the Talmud in tractate Shabbos on page 31a and is codified in the Mishneh Torah in the sixth chapter of Hilchos Deos. This mitzvah is #206 of the 248 positive mitzvos in the Rambam’s Sefer HaMitzvos#60 of the 77 positive mitzvos that can be fulfilled today as listed in the Chofetz Chaim’s Sefer HaMitzvos HaKatzar.