Let us analyse a modal harmony, such as someone playing the G lydian chord:
G - A - B - C# - D - E - F#
1 - 2 - 3 - #4 - 5 - 6 - 7
If you have a G lydian chord, you can play the G major pentatonic to emphasize the 1, 3 and 5 chord tones and "play it safe". However you can also play the A major pentatonic as it has the #4 chord tone of the G lydian:
G major pentatonic scale: G A B D E (G lydian degrees: 1 - 2 - 3 - 5 - 6)
A major pentatonic scale: A B C# E F# (G lydian degrees: 2 - 3 - #4 - 6 - 7)
This is known as pentatonic superimposition. If you have lydian mode, this is always going to work - i.e. just play the major pentatonic a whole step above.
What about D major pentatonic?
D major pentatonic scale: D E F# A B (G lydian degrees: 5 - 6 - 7 - 2 - 3)
This would work too, but be aware that you might not get the sound of the Lydian (#4)!
Experiment with the other modes and you will find that the docile pentatonic scale can be a very potent tool even for Jazz and Fusion genres...