It's a reasonably good time to go - not too hot nor too humid.
Things to buy: why must buy anything? ;-) Take snaps and bring home memories...... (that said, my aunt and friends did like their silk and sequinned ladies bags)
Things to eat:
1. I rate having a bowl of pho from the streetside hawker, sitting really low on stools, as a big highlight; as is eating this chendol looking shaved ice thing with condensed milk.
2. There's the usual deep fried pork ribs with a mint, cabbage and sprouts salad and a bowl of porridge - try to eat this by a streetside shop (there's one near the railway station that's quite good though I really can't remember the road - but this is standard fare)
3. Fanny Ice Cream
4. Restaurants where you can order the usual Viet dishes - Quan Com Pho restaurant (9432356), Club Opera (opposite the Sofitel - serves gourmet Vietnamese; expect to pay a bit. 8246950), Nam Phuong (8240926), Brother's Cafe (rather pricey touristy, buffet style, Hoi An branch is way way more impressive. 7333866)
5. Cafes -
this 2001 article is still quite accurate (prices might have gone up a tad). After reading it I went to eat at Cafe 252 that Catherine Deneuve visited......... Not much atmosphere but lots of pictures on the wall of the proprietress' father taking pictures with a rather bored looking Catherine Deneuve. Strangely he looked like the reincarnation of Aristotle Onassis............
Aside: IMO, Vietnamese coffee is fun to drink on vacation there, but it seems that the fun quickly dies when you buy some home and make it yourself.
Places to visit:
I am sure any travel site will be able to list lots, but I'd say the highlights for me were taking walks around the Old Quarter, both day and night (also taking in the side roads along Hang Gai Rd away from the OQ), walking around the HK lake in the evenings, visiting the many small art galleries and combining a visit to the Temple of Literature with a visit to the Fine Arts Museum situated just across the road. I also played chatek with some kids and watched lots of pavement badminton games - Hanoians are pretty exercise prone people.
The Hanoi 'Hilton' prison has been considerably destroyed by a monstrosity of a commercial development, temples are kinda passe with me, the Water Puppet show is ok lah, though I would still recommend it for want of something to do at night. ;-)
Enjoy your trip! 3 days 2 nights is enough time to see a lot and not get bored. I'd rent a motorbike to speed up the sightseeing, though, it is really a very walkable city.
Where are you staying?