Hue became the capital of Vietnam in 1802, and would remain the capital of at least a part of Vietnam until 1945. Before that it was a major trading city and regional capital (though Hanoi was always the capital).
You can read about the history in detail here.
It has been dominated by the Nguyen lords who's palace is still the centre of the old city. The city is also surrounded my mausoleums of the Nguyen emperors. Although the city became secondary to Saigon after the arrival of the French, it was still the ceremonial capital hon until the end of WWII.
We did it as a day trip from Danang. British friends told me it was not doable but American friends suggested it was. This may reflect a difference of what we think of as a long way to go as much as anything else (my summer drives to Peachland being the equivalent of a cross country trip for them). In fact it can be done in a day, but you won't see it all. We rented a car and driver for about 1.2 million VND (75 Cad/60 USD) plus entrance fees and were set. We decided to leave Danang at 8am and went straight up in to the mountains north of town. The views were spectacular.
an old US bunker
gives a decent view of Danang
the coast east of Danang
and the coast to the north of Danang
After that it was a two hour drive to the Royal Palace of the Nguyen lords. The area was partially destroyed during fighting between the US and communist forces in 1968, but has been rebuilt since the 1980's partially for heritage reasons, partially for tourist reasons, and partially because it was actually the communist forces who did the damage, and locals didn't appreciate it. Good on the government here for fixing their mistake, and it makes for a wonderful bit of history. We spent a few hours walking around the palace and reading about the Nguyen dynasty. We also took a few pictures.
After spending a few hours there we headed off to see the mausoleums of some of the Nguyen kings with a stopover at a large, very ancient, pagoda. Unfortunately we could only see one of the royal mausoleums, but it was amazing in itself and we were both a bit tired at that point.
river that circles Hue
We then started the two hour drive back to Danang.
Hue is definitely a day trip from Danang, though with a night in Hue you would get to explore more of the history and see a bit of the nightlife. Being that I would rather not lug my stuff to a new hotel every night I opted for the day trip.
Very much worth it.