"The band has five members."
Translation:Bandet har fem medlemmar.
Ledamöter (sing. ledamot, en) are members of an elected assembly, a committee, or a board of a company/association or the like. Members of parliament are called ledamöter, for example. The word carries a strong degree of formality and implies responsibilities.
Medlemmar (sing. medlem, en) are members of quite much anything else. It could be of a football club, a philosophy group, a political party or a band. While it implies some sort of commitment or interest, it doesn't necessarily have to mean the member is very active.