Map from Google - Miami

The climate of Miami is tropical, with pleasantly warm winters, and long and muggy summers.
Here are the average temperatures.
Average temperatures - Miami
MiamiJanFebMarAprMayJunJulAugSepOctNovDec
MiamiJFMAMJJASOND
Min (°C)141516192123242424221815
Max (°C)242527283031323231292725
Min (°F)575961667073757575726459
Max (°F)757781828688909088848177

Rainfall amounts to about 1,500 millimetres (60 inches) 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
MiamiJanFebMarAprMayJunJulAugSepOctNovDecYear
MiamiJFMAMJJASONDY
Prec. (mm)50506010016019017018024021070451525
Prec. (in)222.43.96.37.56.77.19.48.32.81.860
Days55568111413151276107

Winter in Miami is pleasantly warm. Rainfall is fairly rare, and is brought by cold fronts that sometimes can move from the continent to southern Florida. Cold waves 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 arrive, bringing mainly a little cold at night for two or three days, with lows around 5/8 °C (41/46 °F), while the days remain very mild, around 18/20 °C (64/68 °F). In January 1977, when many American states were hit by an intense cold wave, in Miami the temperature dropped for a couple of nights to -0.5 °C (31 °F), but even in those days of low-temperature records, daytime temperature remained about 15 °C (59 °F). In 22 January 1985 a similar situation occured, with a minimum temperature of -1°C (30 °F), and a maximum temperature of 15 °C (59 °F).

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 regularly shines.

From June to November, Miami can be affected by hurricanes, which in any case are more frequent from mid-August to late September. In the past, some hurricanes have directly hit southern Florida and have been destructive, such as the Great Miami Hurricane in September 1926, Okeechobee in September 1928, 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, 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 (75 °F) in winter, while in summer it gets very warm, so as to allow long swims.
Here are the average sea temperatures.
Sea temperature - Miami
MiamiJanFebMarAprMayJunJulAugSepOctNovDec
MiamiJFMAMJJASOND
Sea (°C)242424252729293029282625
Sea (°F)757575778184848684827977

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 the weather can be a bit cool, windy or rainy.
For swimming, as we saw the sea is warm enough also in winter, although the weather is not always ideal: sometimes it can be cool, or even a little cold: so it's better to go in the period 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.