Don't fight protracted insurgencies in distant countries, when you understand little of the language or culture, and there is a nationalist tendency in the population. Don't spend massive resources in countries with an imperial history that will only resent your presence in the long run, and that are very difficult to change, or perhaps not interested in democracy at all.
Those are some easy lessons, but quite obviously, we haven't taken them to heart.
I don't think we learned our lesson, but we should have. The most important lesson for me is that a war that is unpopular with both Americans and the world is a losing propsition. When we end up relying on our moral high ground to justify our actions, we are doomed. In reality, we find out we don't have one.
One of the lessons of the Vietnam War is that democratic power unguarded turns to authoritarian tyranny. Such is the case with the secret escalations of the conflict in Vietnam--perhaps that unbridled power has never yet been reigned fully back in as is perhaps witnessed by the bitter partisanship that characterizes contemporary politics and governance.
Another lesson, in my opinion, is that no leader should ever enter into a war without an exit strategy. The Vietnam war waged on for so long, because nobody really knew what the end goal was. If people don't know what goal they are heading for, they will never know if they reach it.
The second lesson for me is, that even if you don't support war, you must support the warrior. So many Vietnam vets gave so much for their country, but they came home to a country that forgot them. This caused so much psychological stress that many of our heroes struggled with mental illness, depression, and even homelessness. Not a very good commentary on a country that asked so much of these men, but gave back so little.
I would largely agree with #2. The biggest lesson from Vietnam to me seems to be the way in which we have to be incredibly careful before becoming involved in military action in another country. As recent history has shown, if we are not completely clear about our motives and that our reasons can be justified clearly, then perhaps we should not get involved in the first place. Military intervention in another country is a massive deal and should not be embarked upon lightly.
I would argue that the most important lesson to learn from the Vietnam War is that we cannot impose our ways and our values on other people, particularly not by the use of military force. We cannot make other countries be like us or be our allies through military power.
In Vietnam, the only real way to win was by winning the "hearts and minds" of the Vietnamese people. But this is very difficult to do. There is no easy way to make a nation of people like and/or agree with you. We thought that we could make this happen largely by using military force. We were wrong. We seem to be (you might argue) making the same mistake again in both Iraq and Afghanistan.