Acts 19 is the only example of re-baptism in the New Testament and perhaps here is a good place for a refresher look at the baptism in general.
“Washing” was a vital part of the approach to God in the Old Testament. Everyone was required to do it and priests especially lest they be struck dead by God. When John the baptist came preaching in the first century, he commanded it as a requisite for forgiveness of sins and preparation for the coming kingdom. Even Jesus submitted to it. Later, Jesus commanded it as a requirement to be his disciple and to receive salvation. Peter commands it for forgiveness of sins and in order to receive the Holy Spirit. Paul said it was necessary to union with Christ and entry into God’s family. It was an adult action submitted to by people old enough to profess faith in Christ and able to determine the direction of their own lives.
But why did the Ephesians have to be “re-baptized”?
Note how specific this gets. John required baptism in order to be ready for the coming kingdom and to receive the Holy Spirit when the Spirit was finally given. Those who received it looked forward to the coming of these two things. But these believers did not have the Spirit. Why not? The best answer is that they had received the baptism after those things had already come. They were baptized in anticipation of something that had already happened. The baptism was administered in faith that these events would happen, not that they already had. Thus, the baptism was invalid.
Though this is the only case we are told of, the story alone underscores the importance of baptism and doing it correctly.