Mine sweepers are used to neutralize mine fields. If the mines sweeper survives battle, it will automatically neutralize any mines in the system. These are very important ships when launching attacks, especially against large-population planets that can build a mine field defense.
No attacking fleet should ever be without 1-2 mine sweepers unless you know your opponent's BR and you know that he doesn't have mines (i.e. you have seen as many other ship-types as he has BR.) If you are attacking a builder which is heavily defended, 3-4 mine sweepers as part of your attack fleet would not be out of the question. Unless you are sure your fleet will be severely damaged you should also bring mine sweepers in an attack against non-builders, that way you will have one at the front for the attack against the next planet.
In order to neutralize a mine, the mine must be destroyed. If the mine sweeper and attacking ships are destroyed but the mine is not, then the mine will not explode. Just the presence of the mine sweeper will not eliminate the mine. That being said, you do not have to have a sweep equal to the BR of the mine in order to destroy and eliminate it. For example, 9 BR1 attacks and a BR1 sweep would be enough to destroy and neutralize a lone BR3 mine (assuming, of course, that the mine sweeper is one of the ships that survives.)
Mine Sweeper Resources