It is now legal to rent a motorbike in Vietnam if you have an International Drivers' License. It's not a good idea to do so, however, unless you have ridden one before. City traffic is chaotic, country roads may have human-size potholes, and local drivers are unlikely to stick to the rules of the road. If you are involved in an accident you, as the foreigner, will be blamed (whether it was actually your fault or not) and be liable for all costs, including hospital bills for any injured parties.
Previously, though technically illegal, the practice was widespread and so there is a good network of rental sources throughout the country, and most hotels will organize a rental for you. For a day rental, check what time you need to get back. You can rent motorbikes and scooters in major cities at most tourist cafés and some hotels and guesthouses for about 80,000d to 120,000d a day. A deposit is usually required, along with a passport or a photocopy of one (it's best to leave a copy). It is a legal requirement to wear a helmet, all agencies provide them at no extra cost, but a better quality helmet (look for the safety mark and hologram sticker on the back, showing that it's passed the minimum legal safety standards) can be picked up for around 215,000d—a wise investment.
Many rental bikes are not in good condition, so always check brakes, tires, and lights before agreeing to the rental; also check the gas tank, which may have been siphoned, and ask for the location of the nearest gas station.