It depends on your goal. If you want to see wildlife then after the 4th of July. If you want the mildest days and the least rain Late May to mid August. The rainy season (it being all relative) starts in Southeast Alaska in August. If you want to see the mid night sun May 18 - August 3. However as a long time Alaskan I can tell you that we say "if you don't like the weather wait ten minutes it will change."
Mid-late September is the worst time. Those of us who live here call it "the pits"
July August willbe the most crowded.