Like Helsinki and St Petersburg, Tallinn is far enough north to experience 'White nights', when the sun doesn't set until late at night. During the summer it is still bright when cruise ships set sail in the evening.
The warmest months are June to August, when daytime high temperatures are 18-21°C (65-70°F).
There are about 180 rainy days a year. The rainiest months are July to September. This would make June the best time to visit, but these are only long-term averages.
Apart from an umbrella, the other must for your trip around Tallinn is a pair of solid shoes with rubber soles. The cobblestones of the Old Town are uneven and slippery when wet.
Society
Tallinn is a peaceful capital and the Old Town is particularly safe for visitors, although the usual warnings about thieves apply.
In the evening, groups of rowdies are more likely to be foreigners than locals. This is a popular destination not only for cruise visitors but for Finnish "vodka tourists" and British stag parties too.
Young people in Tallinn are likely to speak some English. Estonians are friendly but reserved. Anyone actively approaching tourists is probably trying to give away advertising leaflets.