Map from Google - Miami

The climate of Miami is tropical, with pleasantly warm winters, and long and hot summers.
Here are the average temperatures.
Miami average temperatures
Miami J F M A M J J A S O N D
Min (°C) 16 17 18 20 23 24 25 25 25 23 20 17
Max (°C) 25 26 27 28 31 32 33 33 32 30 28 26

Rainfall amounts to about 1,500 millimetres per year. There is no real dry season, although the least rainy season is winter, from December to February. In summer, from May to October, the rains are abundant, but they occur in the form of showers and thunderstorms, which release a lot of rain in a short time, and therefore do not reduce too much the sunshine hours.
Here is the average precipitation.
Average precipitation Miami
Miami J F M A M J J A S O N D Year
Prec. (mm) 50 50 60 100 160 190 170 180 240 210 70 45 1525
Days 5 5 5 6 8 11 14 13 15 12 7 6 107

Winter in Miami is pleasantly warm. Rainfall is fairly rare, and is linked to the cold fronts that sometimes can move from the continent to southern Florida. The waves of frost typical of large areas of the United States do not arrive here: in fact we are almost at the Tropic. Every so often, however, from December to March, a bit of cold air can come here, bringing mainly a little cold at night for two or three days, with lows around 5/8 °C, while the days remain very mild, around 18/20 °C. In the exceptional January 1977, when many Americans states were hit by an intense cold wave, in Miami the temperature went down for a couple of nights to -0.5 °C, but even in those days of low-temperature records, highs remained about 15 °C. In the 22nd of January 1985 it happened again, with a minimum temperature of -1 °C and a maximum temperature of 15 °C.

The short spring, in March and April, is warm, and there is already an almost summery weather, but without the sticky heat that will reign in the following months.

The long summer, from May to October, is hot, but above all sultry, although sea breezes give a bit of relief. Showers and thunderstorms are frequent and sometimes may be intense, but for the rest the sun shines regularly.

From June to November Miami may be affected by hurricanes, which in any case are more frequent from mid-August to late September. Some of the past hurricanes have hit directly south Florida and have been destructive, such as Okeechobee in September 1928, the Great Miami Hurricane in September 1926, and Andrew in August 1992.

The amount of sunshine in Miami is very good all year round. The sunniest months are March and April, while the least sunny are those of winter, when the sun still often shines. In summer the sky is not always clear: scattered clouds can form quite often, and can sometimes swell up, leading to showers and thunderstorms, then the sun will shine again.

South Beach

For swimming, the sea is warm enough all year round, as it does not drop below 24 °C in winter, while in summer it gets very warm, so that it's possible to take long baths.
Here are the average sea temperatures.
Sea temperature Miami
Miami J F M A M J J A S O N D
Sea (°C) 24 24 24 25 27 29 29 30 29 28 26 25

When to go

The best time to visit the city of Miami and explore the nature around it, like the Keys or the Everglades, goes from December to April. In winter Miami is definitely the warmest and most sheltered place in the United States, and there are many sunny days, but sometimes there can be a bit of wind, cool air and some rain.
For swimming, as we saw the sea is warm enough even in winter, although the weather is not always ideal: sometimes it can be cool, and even a little cold: so it's better to go in the period going from mid-March to late April. In May, the heat begins to be felt and thunderstorms increase in frequency, but you can still go. Of course you could also go in the long summer, but there is a muggy heat, as well as the risk, which should not be underestimated though statistically unlikely, of hurricanes.

See also the climate of Florida.