Kevin Flynn didn't know all of this from start, he has to learn it. He also programmed a lot of things on the original grid :
I shouldn't have written all of those tank programs.
- Kevin Flynn
The first time he showed his powers, He reassembled and reactivated a destroyed Recognizer, which came from a game he wrote.
In Tron Legacy, Kevin Flynn is not a normal user, he is the creator of the second grid. He know everything about it, plus he is there for a long time. Also note than since it's Clu that sent the call on Alan Bradley's pager, he was expecting the arrival of a user and probably set up some defence against him. Kevin, as the creator off the grid, has the knowledge AND experience to evade those, but not Sam.
Sam may have the same powers, he is a good programmer and a competent hacker, but didn't learn to use them (yet).