Rankings are awared by completing the waves through zones 1, 2 and 3 with 10 waves each in Combat Mode. I don't know the exact factors for the rankings, but it's most likely the time you need to complete a mission as well as the percental damage taken to the terminals and the city.
If you don't seek the challenge, S-Rankings are practically guarantueed, when you set the difficulty to Easy.