I'll echo a little what was said above with some nuances for what I've experienced:
1. It is not only hospital dependent but also specialty and residency/program dependent. Rule ranges from formal (i.e. suits) to business casual to casual. In my specialty, most grand rounds expectations are to wear shirt/tie for men with optional suit or white-coat.
2. Of course, as a medical student, little rules are "big rules" and will get you judged however dumb it may be. What's difficult is that most grand rounds happen after morning rounds for most surgical specialties. But I hated wearing shirt/tie on rounds especially when there's a risk of bodily fluids ruining my clothes during dressing changes, etc. So, I'd have to run to grand rounds and stop by a bathroom on the way and change into my formal clothes---and then run back to the OR after grand rounds with another pit-stop to change back into scrubs.
3. Personal opinion: how you present yourself is extremely important. First impressions matter and it shows respect to yourself and people around you. This is a notion that's not only lost in today's youth in med school but in western society in general. Think about it--how many people look like they just rolled out of bed when they're grocery shopping or flying on an airplane? You may be in the YOLO life, but personally it's so cringe and immature when I see anyone over the age of 10 wearing literal pajamas in public.
4. If you're a medical student, undoubtedly you care what your evals are and things like this may affect how attendings and residents view you ("lol this med student thinks he's earned the right to wear scrubs to grand rounds?!"). Additionally, if you're voluntarily attending grand rounds to network and get to know the program, this is doubly important.
5. It's all up to you and what the rules are in your circumstance. If any doubt, ask the chief what they recommend. Slightly overdressing is never a bad thing in these situations.
All the best,
FS