This one really depends on what type of role you’re interviewing for, and what type of company you’re interviewing with. You need to do your research on this. Several companies still operate a formal dress approach - shirt and tie - though this is becoming less and less common. Most operate a business casual/smart casual approach - shirt and slacks.
Some workplaces are much less formal, where jeans and a t-shirt are perfectly acceptable. What you don’t want, is to out-dress the interviewer. Nothing worse than being sat there in a tie and blazer, whilst the person looking to hire you is wearing a Metallica hoodie; throws the balance way off and just doesn’t work out well!
The good news is, this is a perfectly acceptable question to ask during an initial phone screen or as a reply to an interview invitation (most will actually state it in there).