The speaker of "The Wife's Lament" is a woman with many years of life experience under her belt. As such, she feels qualified to advise the younger generation, offering them her many pearls of wisdom.
In giving the benefits of her wisdom and experience to young men, she advises them that they should always be "sad at heart." This is a reflection of her own deep inner sadness, caused by her enforced separation from her husband. Not only are husband and wife apart, they are forbidden to be together by the husband's kinsmen, which makes their separation all the more painful.
What the wife seems to be suggesting here is that young men should be sad at heart so as to avoid being damaged by life's many disappointments. If you never expect anything good to happen, then you can't very well be hurt when something bad comes along.
Yet at the same time, young men must also appear happy to the outside world. After all, in Anglo-Saxon society, young men were expected to fulfill certain important social roles, such as warrior or king, that involved inspiring others. And it's difficult to see how one can do that if one appears miserable all the time. Whatever he might be feeling inside, it's vital for a young man to appear cheerful on the surface.