Gotland, where it is

In Gotland, the largest island of Sweden, the climate is Baltic semi-continental, with very cold winters and cool summers. The location on the sea makes the climate milder than in the mainland, but also more windy.
Here are the average temperatures.
Gotland - Average temperatures
Min (°C)-3-4-2161013131062-1
Max (°C)103714182019151163
Min (°F)272528344350555550433630
Max (°F)343237455764686659524337

Precipitation is not abundant, since it amounts to 500 millimeters (20 inches) per year, but it's well distributed over the seasons. Here is the average precipitation.
Gotland - Average precipitation

Winter, from December to March, is cold: the average temperature in January and February is slightly below freezing (0 °C or 32 °F). Night temperatures are almost always below freezing, typically by a few degrees, while daytime temperatures are around freezing. Snowfalls are frequent, though usually not abundant. There are also periods when the temperature exceeds freezing, snow melts and it can rain, but the wind, which blows frequently, and air humidity increase the feeling of cold. On the other hand, in other periods the temperature drops more significantly below freezing, though less than in the mainland, however, the coldest records are around -20/-22 °C (-4/-8 °F).

In spring, in April and May, the temperature increases rapidly. In April, cold days are still possible, with some snowfalls; by May the daytime temperature becomes milder, but at night it can still be cold. On the other hand, spring is a quite sunny season, and the days become very long, at least from mid-April onwards.

Summer, from June to August, is mild: the maximum temperatures are typically about 20 °C (68 °F). At night it can get cold in June, and again in late August, but sometimes the temperature can drop below 10 °C (50 °F) also in July and August. Some days can be very cool and rainy. There are also pleasantly warm and sunny periods, with highs about 25/27 °C (77/81 °F). In July 2010, the temperature reached as high as 33 °C (91 °F).

In Autumn, from September to November, the temperature decreases rapidly, the days become shorter and the sun rarer. The rains are frequent, and in November, but sometimes also in late October, the first snowfalls occur.

Gotland, Visby

The amount of sunshine in Gotland is slightly better than in mainland Sweden, and it's acceptable from April to September. In winter, both because of the short days and because of the frequent periods of bad weather, the sun is rarely seen.
Gotland - Sunshine

The sea in Gotland is cold to swim in: the water temperature is still 12 °C (54 °F) in June, then it reaches 17 °C (63 °F) in July and 18 °C (64 °F) in August. However, it doesn't seem to be a big problem for Swedes and tourists from other Nordic countries.
Here are the average sea temperatures.
Gotland - Sea temperature
Temp (°C)43347121718151186
Temp (°F)393737394554636459524643

Best Time

The best time to visit the island of Gotland is the summer, from June to August, since it is the warmest of the year. June is cooler than July and August, but it's a bit less rainy and has longer days. Notwithstanding that pleasant or even warm days in which you can sunbathe may occur, it's better to bring a sweatshirt or sweater, a light jacket and maybe an umbrella.