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 millimetres (20 inches) per year, but is 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 in which 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; in May the temperatures become 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 for the short days and the for frequent periods of bad weather, the sun is rarely seen.
Gotland - Sunshine

For swimming, the sea is cold: the water temperature is still 12 °C (54 °F) in June, and reaches 16 °C (61 °F) in July and 17 °C (63 °F) in August; however, Swedes and tourists from other Nordic countries swim in the sea.
Here are the average sea temperatures.
Gotland - Sea temperature
Temp (°C)43237121617141185
Temp (°F)393736374554616357524641

When to go

The best time to visit the island of Gotland is the summer, from June to August, being 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.