I think that's more a matter of songwriting than it is of sound. I'm talking specifically of instrument tones and playing styles, and to some extent mixing philosophy. Van Halen did covers of some Kinks songs early in their career. Listening to them, you know right away which band is which simply by the sound of the instruments and the playing styles (not to mention vocals).
Speaking of sounding the same, though, there are bands I dislike for that reason. AC/DC is chief among them to me. They sound like they've been writing the same three or four songs over and over since 1974. It's their sound, and it's their style, and that's fine. It's just not for me.
A band like Rush, on the other hand, changed their direction like clockwork. They would put out four studio albums, put out a live album, then change direction for four albums, put out a live album, then chance direction again. Lather, rinse, repeat, for 40 years. Through it all, though, they still always sounded like Rush. I'm a big fan of that band. I always used to joke that if they put out a rap album, I'd probably buy it. Lo and behold, when Roll The Bones came out, the title track had two rap breakdowns in the middle. I stopped making jokes like that.
Led Zeppelin always changed like that, too ... except within each album. One song might be hard rock, then another blues, then another reggae, then another funk, then another psychedelic. Not sure they ever wrote the same thing twice.