Mathematics aside, if I were to go all-in, I would have to pick AK over 77. If it were 99, however, I would take that instead.
With only two to four people at the table, I would go all-in with both hands.
With more, I would go with AK only if I'm short-stacked.
In general, AK wins when no one hits a pair or when you hit a pair.
In general, 77 wins when your opponent doesn't hit a pair.
I like AK better.
P.S. I think the OP is not directly comparing 77 vs. AK. He's asking which is better to go all in pre-flop.