The summers are very mild and extend from June to September.
The winters are cool. Thus it is always advisable to carry a mild sweater with you while you are on a trip to Mexico.
This period is considered as the dry season of the city as there is very little rain and thus can be a good time to visit the city. You can visit Mexico City anytime between March and May as this is the best time for traveling to this exotic place.
This period is considered as the rainy season for the country and the temperature cools down even further during this period.