Cardiff is a southern coastal city of Wales and, therefore, will be quite chilly and windy most of the time. Its proximity to the sea also increases humidity. It rains often, especially in October and January.
The average summer temperature is 16°C whilst the average winter temperature is 5 °C.
For the most reasonable weather, visit in late spring and summer (chances are it will still rain quite a lot though).
Dress and plan accordingly.