The official tourist season -- when hotel rates generally go down and museum and castle doors open -- runs from mid-May through mid-September. This is Sweden's loveliest time of year; summer days are sunny and warm, nights refreshingly cool. (Summer is also mosquito season, especially in the north, but also as far south as Stockholm.) The whole country goes mad for Midsummer Day, in the middle of June.
Sweden has typically unpredictable northern European summer weather, but as a general rule it is likely to be warm but not hot from May until September. In Stockholm the weeks just before and after midsummer offer almost 24-hour light, and in the far north, above the Arctic Circle, the sun doesn't set at all between the end of May and the middle of July.