In this version they modulate from Em to G by the chords Em-D-G? Is there a better way of doing it?
I wouldn't call that a modulation at all, it's a common pop/folk song, mostly in E minor, just with a short visit on the relative major side. The minor's relative major lives in the same double house, just the next door, and the visit is short, just having a cup of tea, not starting to use the major's fridge or sleeping in the same bed or anything. Modulation would mean a more long-term change. In other words, even during the G chord, would you say that's home, where your journey ends naturally? In my opinion, if right after the G chord you play an Em, that's a possible home and could be the end, although a bit surprisingly quick ending.
There's a few different ways to move harmony around, see my answer to "How to determine passing chords" How to determine passing chords
If you want to keep the Em and G while still preparing the listener for the D chord in a slightly less abrupt way, put an Am7 before the D in place of the Em. This is "trick 2" in the answer linked above.
If you start changing things, you might try, for example moving a voice down in steps like this, and setting the chords accordingly. This is "trick 1" in the answer linked above.
(A little bit of trick 2 applied as well, in B7 - Em and Am6/F# - B7 - Em.)
However, that changes many other things as well, like the chord rhythm, which doesn't go One-two-THREE One-two-THREE anymore. And now "liljor och akvileja" get quite a different feeling, etc. And we don't go to the G major chord at all. :)
The simplest, most effective and most used transition chords are Vs, or V7s. The dominant of the new 'key'. So here, in Em, D G is unsurprising. It may not even go under the banner modulation, as those other chords at that point are all included within the key Em, so it's hardly that it's gone into G, especially being back in Em after only three bars.
You ask if there's another way. Several. Going direct from Em to G is one. Cm to G works, as does Co to G. A basic premise is notes moving a semitone to the new chord. The last one does easily - C>B, E♭>D, G♭>G.
One way (but as Tim notes above) that one can move along the cycle of fifths e-a-D-G. This may not sound much like a modulation though. (One cannot play notes in the new key that don't occur in the old key. That's useful on things like C-G or Ab-d or the like). To get the G to "stick" as a key, one my find it useful to use an extended cadence like A7-D7-G or the like.
In a short piece like the one posted. These harmonic movements may be "tonicizations" rather than complete modulations. There is not enough time to indicate a full modulation.