Basic UV mapping–you would need to define where the seams for the UV’s need to be so that you have the least amount of seams with the object flattened with the least amount of distortion. And for lightmap UV’s you need to make sure that nothing is overlapping and it all fits within the 1x1 UV space.
If you’re using an automatic method (which makes UV seams based on angles between polygons) then you won’t get very good results. By default UE4 will generate lightmap UV’s, but it’s not going to be as good as doing it yourself.