Yes, you do have to be attuned to use its magical benefits
The DMG and basic rules say this about attunement:
Without becoming attuned to an item that requires attunement, a creature gains only its nonmagical benefits, unless its description states otherwise. For example, a magic shield that requires attunement provides the benefits of a normal shield to a creature not attuned to it, but none of its magical properties.
5e rules designer Jeremy Crawford reiterates and clarifies this ruling on Twitter:
If you're not attuned to a magic item that requires attunement, you benefit from none of its properties. But it is still an object (a sword, a suit of armor, a book, etc.) and functions as such. And it is magical. See the DMG for more on attunement.
The instrument of the bards describes its various benefits, but all of the ones described there are magical. Without being attuned, you can only use it as if it were a nonmagical instrument of that kind (e.g. a harp, lute, mandolin, etc.); you gain none of the other benefits. As it so happens, bards can use any musical instrument as a spellcasting focus, so this remains true for an instrument of the bards even if you are not attuned to it.
The item description doesn't make any exceptions by specifying that you gain certain benefits without attunement.
...And trying to use its special properties without being attuned may hurt
The instrument of the bards doesn't have any negative effects if you're trying to use it as a spellcasting focus without being attuned.
However, regarding the usage of its special abilities, it does say:
A creature that attempts to play the instrument without being attuned to it must succeed on a DC 15 Wisdom saving throw or take 2d4 psychic damage.
You can use an action to play the instrument and cast one of its spells. [...]
You can play the instrument while casting a spell that causes any of its targets to be charmed on a failed saving throw, thereby imposing disadvantage on the save.
This makes it clear that not only do you need to be attuned to take advantage of these special properties, but even trying to do so without being attuned entails playing the instrument - and trying to play an instrument of the bards without being attuned carries the risk of 2d4 psychic damage on a failed DC 15 Wisdom saving throw.