"I wonder what was the Brotherhood doing around Eastwatch and why did they let the Wildling Night's Watch capture them."
Beric tells us the answer to this one, they were going beyond the Wall because the Great War is coming. Presumably they were going to scout the undead, attack some or for some other purpose. Or their Lord told them to go and help Jon.
Beric Dondarrion: We don't want to go beyond the Wall, we have to. Our lord told us the great war is coming.
Game of Thrones, Season 7 Episode 6, "Eastwatch"
"Why are these members of the Brotherhood detained at Eastwatch-by-the-Sea?"
Presumably because they were headed to Eastwatch to go beyond the Wall and they don't want to fight an extra few members of an undead army, they need all the help they can get.
Tormund Giantsbane: My scouts found them a mile south of the Wall. Said they were on their way here.
[...]
Tormund Gitantsbane: They want to go beyond the Wall too.
Game of Thrones, Season 7 Episode 6, "Eastwatch"
Lastly, even though the following comment is from Gendry I'm sure Tormund and co probably have the same attitude, they don't trust them. Why would three random people want to go North of the Wall? They're also talking about some weird flame god who commands them, yeah don't trust them at all.
Gendry: Don't trust them. Don't trust any of them.
Game of Thrones, Season 7 Episode 6, "Eastwatch"
As @Skooba points out in a comment below too Tormund saw that same fire god burn Mance so it's likely he doesn't trust them just because of this.
And Tormund had some experience with that fire god... When Stannis burned Mance, anyone operating under commands from the same god would be treated with suspicion.