Good questions!
I think one of the hardest things to get a sense of in medical school, especially if you have come straight from undergrad to med school without any detour through the "real world," it's hard to truly understand what it means to do something day in and day out. 3rd year begins to give you a sense of this with regards to the specialties you rotate through, but shadowing is only a small glimpse. Even so, it can be very valuable.
Things to think about when shadowing:
1) Do you like what you're doing? Do you love/hate the OR (does the smell of Bovie smoke make you want to hurl, etc.)? Can you imagine yourself doing whatever it is you're doing for your whole career?
2) Do you like the patients? Old people? Kids? Variety? Some people connect well with a certain group and feel called to care for them and you may sense this.
3) Do you like the "subject"? Do you find fluids/electrolyte physiology fascinating and do you like how that plays into your day with a nephrologist, etc? Do you love head and neck anatomy and find ENT fascinating? Do you hate poop and find GI repulsive?
4) Networking. This one can be huge. In 3rd/4th year you spend most of your time with the residents and a smaller percentage with the attendings. Shadowing gives you some serious face time with an attending and this is a great time to work on building a good relationship. Keep in touch with ANY attending you shadow and establish rapport with, even if you don't ultimately go into that specialty. People always whine about opportunities going to people who "know someone;" this is a good time to work on knowing some people. Getting to 3rd year and already knowing most of the faculty in your chosen specialty is a huge leg up.
5) Research. Shadowing is a great time to ask about ongoing projects you can get involved with. M1/M2 are great years to crank out some really good papers because you have more free time. If you're thinking about summer research and can't decide on a specialty, look for projects that overlap. If you're thinking derm or ent, maybe look at head and neck skin cancers, etc. Derm, rads, ent, look at radiographic imaging for head and neck skin cancers, etc. This is a great way to keep your work specialty specific even if you haven't made a final decision.
Well, those are my thoughts. Hopefully others will chime in too.