To answer your question: Maybe you are not actually working and slacking around most of the time. Or maybe you are working but you think that your project ist unimportant and so your work is insignificant.
To answer what I think is really your question: How can you get your manager to assing you to the bigger projects / give you some more interesting work.
The other answers already said to talk to your coworkers. If you have female colleagues around your age you can ask them what they usually wear to such events to get some insights. Some of my colleagues and I have a private groupchat where we send each other photos of different clothing options before special company events. Depending on your colleagues and ...
Ask your boss - your impression on him is important for your well being in the company.
Ask your colleagues - maybe they have some "plans" they did not share with you yet. Also, they might have the experience of the previous years.
Ask the organizers for advice: they might have decided for a dress code.
At the end, analyze the info and make a decision ...
Office culture varies widely enough that there's no such thing as a universal answer you can get from the internet.
To get a good answer to this sort of question, you really need to talk to a coworker or two about what they normally wear and how formal the event is.