An A rank comes from a strong all-round performance: finish quickly, collect plenty of points, and grab the Special Stage key.
For a reliable A, the original answer suggests clearing the level in under seven minutes, collecting the key more than once, having your whole team at level 3, hoarding rings, and not dying. Ring count and team level are the two that players most often overlook.