For sightseeing, casual clothing and good walking shoes are appropriate; most restaurants don't require formal attire. For beach vacations, bring lightweight sportswear, a bathing suit, a beach cover-up, a sun hat, and waterproof sunscreen that is at least SPF 30. A sarong or a light cotton blanket makes a handy beach towel, picnic blanket, and cushion for hard seats, among other things.
If you're going to coastal cities like Rio, Florianópolis, and Salvador in summer (December, January, and February), dress more informally and feel free to wear flip-flops (thongs) all day—and don’t forget your sunglasses. Southeastern cities like São Paulo, Curitiba, and Porto Alegre, which have lower temperatures, tend to be more formal and more conservative when it comes to clothing (sometimes even Brazilians are shocked by the way people in Rio dress). In urban areas it's always a good idea to have some nice outfits for going out at night.
Travel in rain-forest areas requires long-sleeved shirts, long pants, socks, waterproof hiking boots (sneakers are less desirable, but work in a pinch), a hat, a light waterproof jacket, a bathing suit, and plenty of strong insect repellent. (Amazonian bugs tend to be oblivious to non-DEET or non-picaridin repellents.) Other useful items include a screw-top water container that you can fill with bottled water, a money pouch, a travel flashlight and extra batteries, a Swiss Army knife with a bottle opener, a medical kit, binoculars, a pocket calculator, spare camera batteries, and a high-capacity memory card.