While we do not know exactly HOW does the eyes of the Spider-man suit in Civil War move according to Peter Parker's own eyes, we definitely know WHY.
When Tony Stark goes recruiting the young Peter Parker, he notices Peter's self made costume, with ridiculous goggles. Peter specifically says that he cannot focus on his vision correctly without the goggles, because he cannot handle all of his super-senses at once (yet ?).
Part of Tony Stark's plan was to bribe Parker by offering him a high-tech costume, which would correct the goggles problem by adding some tech (and CGI) to the mask. Indeed, when Spider-man steals Captain's shield, his eyes get smaller and you hear kind of a mechanical sound.
For Deadpool, however, I'm fairly certain no tech was ever mentioned as to why his eyes move. So here's my answer : To make the character more expressive :p
Expressions were added on the mask with CGI in post-production to make him more charismatic, that's all.