My general principle here is that a flashback provides emotional context for current action.
It is used to expose, twist, reveal, or heighten the meaning of something that is happening “on screen”. An easy and obvious example might be: “So you see your old lover, on the other side of the room. Let’s go back in time and see what it was like the last time you saw each other…”
You play out the flashback, and that gives a lot more meaning to the moment we will now “go back to” in real time.
I generally handle flashbacks this way: something in the game would be stronger if it had more emotional impact, or seems like the characters would have reactions to that we, as players, either do not know or do not feel (because we don’t have emotional attachment to them) so we move to a flashback which fills in the necessary information.
It is essentially the same process as asking a revealing or personal question. In this case, the question would be “how do you feel about this person?”, but, instead of simply answering the question, we can play out the scene.
This can be really useful, sometimes, with players who don’t have a ready idea, but like to react to things “in character”. Maybe asking “how do you feel about your mother?” isn’t a very fruitful question for you… well, then, let’s play out a significant moment from your childhood, and you can react in the moment, so that, when we come back to ‘the present’, you’ll have a good basis to make that choice.
With a player like this, simply throwing them into a scene can get them feeling things and defining their character.
In mystery, heist, and suspense genres, flashbacks are also sometimes used to fill in surprising revelations (“but it turned out that the butler had poisoned both cups earlier!”). I find this less fruitful in RPG play, as it can often feel unearned, unfair, or forced. Still, it occasionally has its uses.
In either case, I think the purpose of the flashback is to basically allow the storyteller (in this case, I suppose it’s “the group”) to elide an uninteresting portion of the story. We can go and grab the one specific moment or memory that’s relevant to making our story better, and giving it more context, without having to play out or “watch” all the uninteresting history between the two events. It’s a more economical frame for storytelling, which allows us more nuanced and more detailed, grounded stories within a short timeframe.
The choice for whether the flashback is simply grounding or whether it creates suprising reveals, then, is a technical detail to use as appropriate.
I have less experience with flash-forwards; I think that’s trickier to use in a real-time medium than in, say, film or a book (where you can edit retroactively). Perhaps someone else will have something clever to say there!
There is a very interesting game called “Showdown”, an RPG by Seth Ben-Ezra for two players. In it, you play out the story of a duel between two nemeses. In one sequence of scenes, you play out their climactic battle, moving forwards through time. You alternate these with a sequence of flashbacks, moving backwards through time, which detail their mutual history - as a result, you learn how they first met shortly before the final blow of the duel. Very clever, and works very well! In that game, the dramatic irony and the surprise of the revelations is key: you get to “degrade” your opponent’s character concept by winning the right to tell us how evil, pathetic, or underhanded (for instance) they really are in the flashbacks.