“I opened the door. Then, there was a friend standing outside.”
I know how to make the sentence more natural but I was wondering if this particular sentence is grammatically alright.
Yes, it is grammatically correct because, technically, the tenses used in this sentence are correct. However, using “then” implies that the friend was standing outside only after you opened the door. Instead of using “then,” try using “and.”
See this already answered question relating to starting sentences with “then”: Can I start a sentence with Then?