na-adjective
Almost always used adverbially as いたずらに, meaning 'in vain', 'to no purpose', or 'idly'. The standalone adjectival use is rare.
いたずらに時間を過ごしてしまった。
I ended up spending time idly.
いたずらに心配しても仕方がない。
It's no use worrying in vain.
無駄 is a common word for 'wasteful' or 'useless', while いたずら is literary and emphasizes aimlessness or futility, often in the adverbial form いたずらに.
The origin is uncertain. The kanji 徒 carries meanings of 'futility' or 'in vain', but the word is now usually written in kana.