In this fanfiction concept, Naruto could be given a special mission by some higher - up in his own world, like the Hokage or a sage. This mission could be related to restoring balance in other universes. So, he travels to Batman's world and realizes that bringing back his parents could be a huge step in restoring that balance. He then uses his ability to communicate with spirits (like he did with his father) and finds a way to return Batman's parents' spirits to their bodies.
Well, in fanfiction, anything can happen. Maybe Naruto has some sort of super - ninjutsu that can cross dimensions and time. He could use chakra in a unique way to bring back the dead. For example, he might find a way to access the same magic or energy that created the Lazarus Pit in Batman's universe and use his own ninja skills to manipulate it for resurrection.