While the Bible does not directly address formal church membership, several passages suggest its existence in the early church.
Salvation was a prerequisite for being added to the church, as recorded in Acts 2:47, “praising God and having favor with all the people. And the Lord added to their number day by day those who were being saved,” and in Acts 2:41, “So those who received his word were baptized, and there were added that day about three thousand souls.”
Therefore, churches today that require salvation before membership follow the biblical model. The local church is also well-defined in Acts 6:3, where the church in Jerusalem is instructed to hold elections for deacons.
There are numerous passages of Scripture where church membership is strongly implied.
For example, in 1 Corinthians 5:9-13 Paul seems to assume that people can tell the difference between those who are inside and those who are outside of the church.
In 1 Corinthians 6:4-7, Paul says people inside the church are going outside the church to resolve differences. He says that we ought not to do that, rather we should be able to resolve our differences within the church without going to the secular courts of the land.
Church membership in the Bible is important because it defines the pastor’s responsibility, as instructed in Hebrews 13:17, “Obey your leaders and submit to them, for they are keeping watch over your souls, as those who will have to give an account. Let them do this with joy and not with groaning, for that would be of no advantage to you.”
Without church membership, there can be no accountability or church discipline, as taught in 1 Corinthians 5:1-13.
Therefore, church membership is a way of identifying oneself with a local body of believers and making oneself accountable to proper spiritual leadership.
I can't seem to find anything in Acts 6:3 which mentions elections for deacons.