Weather-wise, that's a great time of year for Sweden, Finland, Estonia, Latvia and Lithuania. Since you have no more than 10 days (which may turn into 9 by the time you consider your flight back home), I'd tend to add only two other countries, though I suppose you could squeeze in three if you made only a brief stop in one (maybe using overnight ferries to have a day in Helsinki?).
There are three factors you may wish to consider:
Estonia, Latvia and Lithuania are likely to be a lot less expensive than Finland and Sweden.
Overnight ferries are very helpful for saving time and can be bargains since you don't need a hotel room that night. However, I learned last summer that if you wait too late to buy your ferry tickets, the cost may triple.
Midsummer is a big deal in at least part of the area under discussion. I ended up with a contorted itinerary in Finland last year because a very large percentage of the sightseeing attractions were closed for 3 (or I think in some cases even 4) consecutive days, and many closed early on the last day they were open. That sort of thing can cause havoc and great disappointment if you're only in a city for 2-4 days. Until you find info to the contrary on the website of the museum, etc., you should consider it possible that places will be closed from Midsummer Eve (June 21) through the weekend. And of course a lot of places are closed on Mondays. Then there are the potential early closures on Thursday, June 20. So be very, very careful about where you plan to be between June 20 and June 24.
Although they are not terribly far apart and had some similar experiences during the 20th century (making for some very interesting historical museums), Tallinn, Riga and Vilnius are quite different from the aesthetic perspective. Tallinn has a lot of medieval architecture. Riga has a lot of Art Nouveau architecture. Vilnius tends to the Baroque. I spent between 9 and 13 days in each of those capital cities and loved all of them.
Helsinki has a lot of Art Nouveau buildings and not a lot of older architecture. Stockholm runs the gamut and also has that lovely multi-island setting. It's a really beautiful city. You really cannot make a bad decision.
In case it helps, these are the secondary cities I visited and enjoyed that might be practical for a short visit; there are many other possibilities.
Estonia: Tartu. (Parnu was less interesting, I thought.)
Latvia: Riga's a must if you get to Latvia, of course. I also liked Liepaja, and I took a day trip to Jurmala, which was a nice change from the big city, though not a must-see sort of place on a short trip.
Lithuania: In addition to Vilnius, I liked Klaipeda and especially Kaunas.
Finland: Helsinki is the key city there. Tampere and Turku have some points of interest, but with limited time I'd stick to Helsinki and one or two of the other countries where you'll likely find more "wow".
Sweden: Badger can make lots of suggestions. It's a large country, and you'd need to limit the area covered unless you want to stick to just Estonia and Sweden. In the area around Stockholm, I enjoyed Uppsala a lot.