1. At about 4 pm I finally get home.

2. About 4 pm I finally get home.
3. At around 4 pm I finally get home.
4. Around 4 pm I finally get home.
5. At about 4 pm, I finally get home.
============================
Are they all grammatical? Do we have to use #1 and #3 in forma writing?
Do we have to put a comma after '4 pm' in formal writing?

Two of us have written earlier that "at" is not needed when "about" or "around" is used.

Thus, #s 2 and 4 are almost correct. The comma after the intro phrase is missing in both these sentences.

"at" -- at that precise time
"about" and "around" -- approximately that time.

And yes, the comma after the introductory phrase is needed.
See #3 here: http://guidetogrammar.org/grammar/commas.htm