It could be that Luke has a unique connection to the Force that gives him the power of time travel. He might have to enter a deep meditative state, and during this trance, he can project his consciousness through time. If he wants to physically travel, he has to use a great deal of his Force strength to fully materialize in another time.
Maybe there's a special place in the galaxy, like a long - forgotten Jedi temple. When Luke enters this temple, he is able to access a time - traveling mechanism. He has to pass certain tests of the Force to be able to control the time - travel function. Once he does, he can choose to travel to different eras in the history of the galaxy.
His time - traveling could have a huge impact. If he changes something in the past, it could create a ripple effect. For instance, if he stops Anakin from turning to the Dark Side, the whole Sith - Jedi dynamic in the galaxy would be different. There might not be an Empire, and the Jedi Order could have thrived without the purge.
When traveling to the future, Luke could become more desperate. Facing a world in chaos or a new, powerful enemy, he'd have to quickly adapt and find solutions. This would make him more willing to take risks and use powers in ways he hadn't before. His view of the Force might also expand as he encounters new forms of it in the future.
Another explanation could be that Teddy discovers an ancient and forgotten spell or artifact. He stumbles upon it while exploring some old wizarding ruins or in the Hogwarts library. This spell or artifact gives him the power to travel through time. And as he's always been an adventurous and curious character, he decides to use it to explore different time periods.
In a time - travel scenario, Anakin's relationship with his mother could be greatly altered. He could go back in time and save her from the Tusken Raiders. This would change his whole outlook on life and his path towards the dark side. Regarding his relationship with Palpatine, he would be aware of Palpatine's true nature from the start. So, he could either avoid Palpatine completely or try to expose him earlier. His relationship with other Jedi, like Ahsoka, could also be different. He could be a better teacher and mentor to her, as he has the experience of his future mistakes.
He could also form a pact with a time - based entity. By making a deal with a being that exists outside of normal time, Doctor Strange might gain enhanced time - travel powers. But this would come with its own risks, like being indebted to this entity. He would have to be very careful about the terms of the pact.
Luffy's abilities would be quite different in Roger's time. His rubber powers would be something unheard of. He would likely be seen as a very strange and powerful individual. Roger and his crew might be both intrigued and cautious around him. His Gear techniques would be a huge advantage as no one in that era would have seen anything like it.
Darth Vader could be an unexpected ally in a time travel scenario. If Luke travels to a time when Vader was still Anakin Skywalker and on the verge of turning to the dark side, Luke could try to prevent his fall. In the process, Anakin might become an ally, using his skills as a powerful Jedi to help Luke in whatever mission he has in that time period.
If baby Luke time - travels to a post - apocalyptic future in the Star Wars universe, he could be the key to rebuilding the Jedi Order. His very existence could inspire the survivors to start anew. They might look at his pure connection to the Force as a sign that there is still hope for a better future, and they would protect and train him to become a great Jedi, changing the fate of the galaxy once again.
One idea could be that baby Luke Skywalker time - travels to the era of the Old Republic. He could end up being found by a Jedi Master there and starts his training much earlier. This would completely change the course of the Star Wars timeline as he'd be much more powerful by the time the original trilogy events are supposed to occur.
His Jedi abilities could be explored through his ability to sense danger. For instance, when there's a plot against a fellow cadet at the Imperial Academy, Luke might sense it before it happens and try to prevent it. This would raise suspicions among the Imperials but also show his Jedi nature.