“Brethren, if anyone among you wanders from the truth, and someone turns him back, let him know that he who turns a sinner from the error of his way will save a soul from death and cover a multitude of sins” (James 5:19-20).
When a brother or sister in the Lord backslide it is the duty of other believers to help bring them back (Galatians 6.1). If they repent you will save them from being judged by the church (Matthew 18.15-17), and possibly by God, who sometimes takes backsliders home (John 15.2, 6; 1 Corinthians 5.5).
When anyone helps bring a prodigal brother back to faith the sins that the backslider committed must be kept quiet. It does no one any good to broadcast to the entire church and the world every sin the backslider committed. Only the one who brings him back and possibly the pastors should know what sins have been committed.
The backslider should be the one to tell the pastors what sins he committed if he feels a need to. If someone confides in you, the best thing to do is be as loving and be available as possible. Spend time together in prayer and reading the Bible. Encouragement and tender loving care are very much needed when a fallen brother or sister repents and sincerely wants to serve the Lord again.