I'm assuming this question is focused on the meaning of the words in contemporary popular music -- not the meaning from other eras.
I think you can use the term group to refer to a band, but the term band does not apply to all groups.
A band strongly implies that the members play instruments, aside from just singing and dancing. The Beatles and U2 are examples of bands.
A group can be any band. The Beatles and U2 are also groups. But a group can also refer to performers who don't play instruments onstage (or in a music video). These performers primarily sing and/or dance. Usually "session musicians" or a "backup band" perform the instruments to the side of the stage. Sometimes, the music is completely or mostly pre-recorded (with just a live DJ). For example, it's rare to hear the term "hip hop band." Instead, you would say "hip hop group," because the performers that are center stage are using only vocals and dance.
One notable exception: There is the idiom boy band. Wikipedia describes it as such:
A boy band (or boyband) is loosely defined as a vocal group consisting
of young male singers, usually in their teenage years or in their
twenties at the time of formation, singing love songs marketed
towards young females. Being vocal groups, most boy band members do
not play musical instruments, either in recording sessions or on
stage, making the term something of a misnomer. However, exceptions do
exist. Many boy bands dance as well as sing, usually giving highly
Full text is https://en.wikipedia.org/wiki/Boy_band. Throughout this page, group is consistently used to refer to vocalists, and band is consistently used to refer to instrumentalists.
Examples of boy bands are Backstreet Boys and 98 Degrees. I believe the origin of the boy band goes back to The Monkees in the late 1960s. Boy bands are typically put together by record companies and are given hits to perform. In such cases, their success is pretty much guaranteed, because the record labels have access to the best producers. Sometimes they have skills as musicians (guitar, keyboard, etcetera), but more often than not they are chosen for their vocal skills and appearance.
The female counterpart is called a girl group. Again, these singers focus on vocal and dance performance. Salt 'n' Pepa and Wilson Philips are a couple of examples. Girl groups dominate the pop charts in Asia. A particularly funny one is the Akihabara 48 in Japan, where 100 young ladies constantly compete to be a part of the 48 you might see onstage on any given night.
One can't help but think that the term "boy band" became an idiom because of its alliterative quality.