To me, it's simple that black and equal races are equal. But since the recently, black people had a lower status than white people and also suffered from discrimination as everybody knows, and I'm wondering, because the Christianity exists around 2000 years, and these issues were among white Christians, so I'm wondering maybe what we think today, wasn't simply understood to people in past, therefore I'm looking for proofs/verses from the New Testament that support or oppose the idea that black and white people are equal in their rights etc.
As far as the Jews were/are concerned, the most significant difference between differing people groups in the Bible was/is the distinction between Jews and Gentiles. All other distinctions, such as wealth, colour of skin, etc, are as nothing compared to this difference. This was the chief difference in the Old Testament.
In the New Testament, in that Jew and Gentile are brought together as equals in the Gospel Age it follows that all other differences are also to be treated as irrelevent.
So in Ephesians we are told that the Gentiles are "fellowheirs, and of the same body", (Eph 3:6). "Fellow" here means "equal": the Gentiles are equally heirs along with the Jews.
The Apostle continues into the next chapter, "There is one body, and one Spirit, even as you are called in one hope of your calling: one Lord, one faith, one baptism, one God and Father of all, who is above all, and through all, and in you all", (Eph 4:4-6).
Seeing we all who are in Christ have "one ... Father of all" and "one baptism" it follows there is equality between all who are in Christ, irrespective of their roots.
And I am minded to add "There is neither Jew nor Greek, there is neither slave nor free, there is neither male nor female; for you are all one in Christ Jesus" (Gal 3:28); and
"where there is neither Greek nor Jew, circumcised nor uncircumcised, barbarian, Scythian, slave nor free, but Christ is all and in all." (Col 3:11).
Also, everyone who repents and believes in Christ "puts on Christ" (Romans 13:14), they put on the righteousness of Christ, like a piece of clothing. God the Father now sees the believer as having the complete righteousness of His own Son: this righteousness, being not ours but His Son's, is the same measure of righteousness for all believers: of course it must be, because it is precisely the same righteousness, being Christ's. All then are equally righteous.
Finally, early in John's Gospel we have our Lord speaking to two very opposite kinds of sinners:
The first is Nicodemus. This sinner is: A man. A Jew. A member of the Sanhedrin. Reputed as very knowledgeable in the Bible that at that time existed, viz the Old Testament. A teacher of religion. Probably rich. Held in high regard by the Jewish people. But all these advantages are no good to him. They will not bring him into a right standing before God, he will still spend eternity in the flames of hell unless something happens. Jesus says he "must be born again" (John 3:7). He needs to be born of the Spirit of God to change him and make him a new creature.
The second is the woman of Samaria. This sinner is: A woman. A Gentile. A member of the Samaritan nation and religion which was despised by the Jews. A follower of false religion. She is poor. She is held in low esteem even by the despised Samaritans because she is living with a man who is not her husband. But all these disadvantages will be no hindrance to her becoming a child of God: all she needs to do is see her spiritual need and ask the right person for the living water.
The point I am wanting to make is that the opposite from the outwardly moral Nicodemus is not a black person or any other kind of person: the opposite is a person of low reputation because of her lifestyle which blatantly disregards accepted moral standards.
Despite their obvious outward differences these two sinners have precisely the same need: faith in Christ and in his taking their punishment for their sins at the cross; they both need the Holy Spirit to give them the new birth; they both need a new start in life. The human heart is a deep well. They do not need to tie a few apples onto the thorn bush of their souls to make them appear outwardly fruitful. God needs to change them and us deep within our souls by giving us that living water that bursts out into a changed life.
The only important difference between people is if we are born again of the Spirit. If we have the Spirit of Christ then we are spiritually minded and at peace with God; if we have not the Spirit then we are carnally minded and are at enmity against God,
"For to be carnally minded is death; but to be spiritually minded is life and peace. Because the carnal mind is enmity against God: for it is not subject to the law of God, neither indeed can be. So then they that are in the flesh cannot please God. But ye are not in the flesh, but in the Spirit, if so be that the Spirit of God dwell in you. Now if any man have not the Spirit of Christ, he is none of his." (Romans 8:6-9).
There is no halfway house here: you are either born again and pleasing to God, or you have not the Spirit of Christ and are at enmity against God. This is the only truly important difference.
Outward differences are immaterial. The human heart is the same the world over.
Faith in Christ, being born again, is the only difference that really counts.
The most striking and most comprehensive statement I know of in this regard, not just in scripture but anywhere, is made by Paul on Mars Hill in Athens, as reported by Luke :
God that made the world and all things therein ... hath made of one blood all nations of men for to dwell on all the face of the earth. [Acts 17:22 and 26 KJV]
εξ ενος αιματος [TR - Textus Receptus] - of one blood
Leviticus 17:14 makes it clear that 'blood ... is the life of all flesh, its blood is for its life'.
So Paul, in drawing attention to the fact that all humanity has the same blood (that is to say the same kind of blood, whether it be type O or type A or type B) is drawing attention to the life that is within humanity.
All humanity shares the same life - and the same origin of life (God himself) - whatever the outward appearance, the ethnic origin or the national heritage.
God has made humanity, each and every one. And has given the same kind of life (within, in the very blood) to all. There is no difference.
This is further underlined by the ministry of John the Baptist who made it clear to those who asked him what should they do in regard to repentance :
He answereth and saith unto them, He that hath two coats, let him impart to him that hath none; and he that hath meat, let him do likewise. [Luke 3:11 KJV]
Whoever (whosoever they be) who lacks clothing or food (for whatever reason they lack it) is to be granted the same from anyone (whosoever they be) who has more than the basic necessity, themselves.
Because we all share the same life : God-given life.
Therefore we should value, and care for, the life that is within one another, as though it were our own life.
Equally, as to our own selves.
Galations 3:26-29 NIV (emphasis mine)
26 So in Christ Jesus you are all children of God through faith, 27 for all of you who were baptized into Christ have clothed yourselves with Christ. 28 There is neither Jew nor Gentile, neither slave nor free, nor is there male and female, for you are all one in Christ Jesus. 29 If you belong to Christ, then you are Abraham’s seed, and heirs according to the promise.
There was also the Incident at Antioch, referenced in Galatians 2:11-21. In addition, there was Peter's vision with the unclean animals and the visit to Cornelius the centurion, in Acts 10. Furthermore note references to children of Abraham being added or removed, like branches of a vine being grafted in or pruned, as well as how Jesus treated the gentiles who came to Him. He even said of a gentile centurion,
“Truly I tell you, I have not found anyone in Israel with such great faith. 11 I say to you that many will come from the east and the west, and will take their places at the feast with Abraham, Isaac and Jacob in the kingdom of heaven. 12 But the subjects of the kingdom will be thrown outside, into the darkness, where there will be weeping and gnashing of teeth.” Matthew 8:10-12 NIV
(He's obviously only talking about the unfaithful ones being thrown out, not any of the faithful - a specific expression of the same general rule that applies to gentiles.)
We can also look to the Old Testament. While the New Testament changes the landscape, the authors of the New Testament would still point back to the Old Testament in certain scenarios. That said, we have, for example, Numbers 15:13-16 NIV (emphasis mine):
13 “‘Everyone who is native-born must do these things in this way when they present a food offering as an aroma pleasing to the Lord. 14 For the generations to come, whenever a foreigner or anyone else living among you presents a food offering as an aroma pleasing to the Lord, they must do exactly as you do. 15 The community is to have the same rules for you and for the foreigner residing among you; this is a lasting ordinance for the generations to come. You and the foreigner shall be the same before the Lord: 16 The same laws and regulations will apply both to you and to the foreigner residing among you.’”
Remember also how Rahab, Ruth, Ittai the Gittite, Uriah the Hittite, and so on were effectively aliens from Ancient Israel, who then lived among and/or immigrated into the Israelites, at which point they became more honored, one way or another, than the vast majority of the native-born.
While race relations today may place a large focus on white, black, Latino, etc., race relations in the Bible often dealt with Jews and gentiles, Hebrews and Egyptians, etc. (Come to think of it, God's blessing Egypt through Joseph is another OT hint that all races are equal.) While the Bible may not tend to mention blacks and whites specifically, there's a lot of text on similar matters, in both Testaments, that can be very, very easily applied to the context of this question in the same way.
In both Testaments, the issue was always a person's relationship to God. Even the Great Commission speaks to this Christ-centric equality. And if you read the Old Testament, non-Jews were allowed to become Jews, just like non-Christians today are allowed to become Christians.
In fact, if you look where Israel and Jerusalem were placed, as well as where the Temple of Solomon and the death and resurrection of Christ were, all were at the crossroads of humanity - the very nexus of Asia, Africa, and Europe. This has been God reaching out to all of humanity, yet another suggestion - this one fully applicable to both the Old Testament and the New - that humans are created equal in the eyes of their Maker.
Edit: I'm speaking specifically to OP's statement "I'm wondering maybe what we think today, wasn't simply understood to people in past." I don't think it's "understanding" that most people lack, rather I think people want to rule creation according to their own wisdom and not God's, and since that wisdom is twisted we end up justifying both our means and our ends to get and do what we want.
There are good answers here showing what both testaments think of the equality of people under God, and they answer the question. But I think the question could use some more context. It's my understanding that when the African slave trade began from Europe to North America, it was justified not because people of darker skin are less equal, but because they decided to believe that Africans were sub-human. I think that is atrocious, but that's my understanding of how people got around the fact that the scriptures are very clear on this.
Clearly the New Testament does not condemn slavery, it was one of the ways people paid off debts. The NT does condemn mistreatment of anyone, we are all brothers in Christ. Philemon was a runaway slave that Paul writes about. Do not confuse slavery with racism. Two separate issues. Racism and mistreatment are condemned.
In the antebellum US, the Bible was used by both supporters and opponents of slavery to support their own position on race-based slavery. For some interpretations from the period, see https://en.wikipedia.org/wiki/The_Bible_and_slavery#Nineteenth-century_English_and_American_debate . Slavery was taken for granted by the humans who wrote the Bible, as a normal fact of life. But both the Old and New Testaments prescribed and approved of slavery in various cases. Deuteronomy 20:11: "It shall be, if it gives you answer of peace and opens to you, then it shall be that all the people who are found therein shall become forced laborers to you, and shall serve you." Ephesians 6:5: "Servants, be obedient to those who according to the flesh are your masters, with fear and trembling, in singleness of your heart, as to Christ[...]"
The concept of black and white races postdates the Bible by 1500 years or more, and slavery in the ancient world was not race-based. However, the curse of Ham was used as an explanation for the origin of the "Negro race" and as justification for enslaving black people. This came with pseudoscientific descriptions of biology and linguistics, with, e.g., Adam being interpreted as meaning "red," so that he was a member of the red (i.e., Native American) race, and Ham as meaning "black." The curse of Ham and other biblical argments were used by LDS as a reason to exclude black men from the priesthood until a revelation from God in 1978.
The gospels aren't very concerned with secular law and rights, and it would have been an anachronism for them to discuss anything like the modern concepts of race and racism. Jesus's teachings tended to subvert social distinctions such as the ones between Jews and gentiles, as in the parable of the good Samaritan or his overthrowing of the Levitical purity regulations (e.g., Mark 7). But the very first words of the gospels are "The book of the genealogy of Jesus Christ, the son of David, the son of Abraham." In other words, it's very important to establish that Jesus has the right kind of ancestors. This is mainly to convince Jewish readers that Jesus meets the criteria for fulfilling the prophecies of the messiah. But it would also appeal to those readers by showing that Jesus was one of them. It would be completely inaccurate to take a modern concept like color-blindness and impute it to Jesus as some kind of ethnicity-blindness. He repeatedly refers to gentiles as pigs and dogs (Matthew 7:6, Mark 7:27). When he performs healing miracles for gentiles, he does it grudgingly after an initial refusal, and in Matthew's depiction of these events, Jesus also makes general statements to the effect that his mission is not to the gentiles (15:24, and cf. 10:5).
So in summary, the concepts of ethnic and religious identity in the New Testament do not map cleanly onto modern concepts such as black and white races, but in general, the New Testament is favorable toward slavery, while providing mixed messages on whether it is important to be a member of a particular ethnic or religious group. The messages that tend to translate most positively into modern liberalism are the ones that come from Jesus's mouth, especially with some of the amendments (e.g., Luke 4:25, Matthew 28:19) inserted by Christian editors in an effort to make the religion more gentile-friendly.