If you aren't worried about learned moves at higher levels, as soon as possible. There aren't any moves that Porygon gets that Porygon2 doesn't, besides the useless Sharpen. If you want to learn moves faster, wait to evolve it until it has learned the moves you want it to.
As for the second question, it depends on which Porygon you decide to stick with. Porygon2 has higher defenses that Porygon-Z and is a complete beast with the Eviolite boosting its defenses by 150%. It makes a fantastic wall or tank. Porygon-Z works best as a fast, hard-hitting sweeper making use of its huge base 135 special attack and its great set-up moves in Agility and Nasty Plot.
Check out this for Porygon2 movesets, or this for Porygon-Z movesets. Or you can check out the moveset pages for each one on the Pokebase.