Stormtrooper armor protects its wearer from many hostile environmental conditions: extreme heat, extreme cold, toxic gases, and even short periods of exposure to the vacuum of space. In addition to acting as a full NBC suit (as seen in ANH when two stormtroopers were seen surviving the vacuum of space), it protects against physical threats such as shrapnel and blaster bolts. Due to the sheer firepower of blasters, however, the protection that any armor can offer is limited; the armor cannot fully protect its wearer from a direct hit, although it may mitigate the damage.
Stormtrooper armour is specifically described as being impervious to projectile weapons, but this claim isn't entirely accurate; the white, rigid components are resistant to projectile small arms, but projectiles can still reach the wearer through the armor's joints.
Equipped with built-in air filters, vision enhancers, targeting systems, suit environmental controls, communications gear, and 20 minutes of emergency oxygen supply, Stormtrooper armor offers various features to aid in combat situations.
We clearly saw camo-armor in the Imperial ranks in ROTS.
Stormtrooper Armor in Debates
Some idiots try to use physical impacts knocking troopers over as evidence the armor can't be bulletproof, but that only shows their lack of understanding of momentum. No armor can violate conservation of momentum. The momentum is still transfered to the target regardless of the strength of the armor. Consequently, if you're wearing a helmet in real life and get hit in the head, you can suffer a head injury even if the the helmet remains intact (hockey players have been known to get concussions from impacts that don't damage their helmets).