There are pros and cons to each. The standalone AME application has two-pass encoding, so some formats can be compressed more effectively. Also, you can be encoding in AME and still working in After Effects.
What, exactly, are you trying to do. If you answer that, it's easier to guide you one way or the other.
To tell you the truth, I was just testing out how long it took to export a 5 minute 1920x1080 h.264 file using MB looks color grading. I wanted to know which one exported out faster, so I can use this workflow from now on. I didn't know that that AME used 2 pass encoding. Which probably would lead to it taking LONGER to render out correct?
2 passes encoding is indeed longer to render, but much more high quality. It really depends on what you want to do with your rendered file. If it's for grandma to watch on her bluray player, 1 pass can be your best option. If it's for a client / broadcast, 2 pass is mandatory.