This will depend on your preferences, but the Mexico City rainy season is from about April to October, so many want to avoid that. It doesn't usually rain too much in Mexico City in October, but if you want sunny days everyday on your trip, visit in the dry season from November to March.