I'll chime in here with a couple of suggestions. A lot depends on what part of Alaska you wish to visit. If you are going to Anchorage and renting a car/RV or taking the train, all you have to do is avoid major holidays (Memorial Day, 4th of July, Labor Day, etc) and peak fishing seasons. You can find the peak fishing season for the various locations at the Fish and Game department website Home Page, Alaska Department of Fish and Game. May is usually chilly with some snow still on the ground depending on where you go. Personally, I prefer the end of July/beginning of August to visit. The flights are not usually terrible since you are often in the middle of a major fishing season (again, everything depends on the destination, try to avoid major cruise departure dates) and the weather is the best it will be all year. As a first timer, my suggestion is to consider a cruise to get an idea of what you like and what you don't. It's convenient and you get a good view of SE Alaska along the way. I'm going to be taking the train to Denali myself in a couple of weeks then heading to Kodiak.

Remember, Alaska is a huge state so the weather and attractions vary widely based on where you go. I can suggest that you avoid hard to get to/from destinations for your first trip (Kodiak, Barrow, Prudhoe Bay, Dutch Harbor) and stick with the easier cities (Anchorage, Fairbanks, Sitka, Yakutat, Juneau, Ketchikan) so you have multiple options in case the flights fill up. If you like a slower lifestyle with the most amazing scenery you have ever witnessed, Alaska is for you! Incredibly friendly people, truly isolated small towns, glaciers that you can get close to (Mendenhall glacier in Juneau) and lots of wide open spaces. My husband and I find it a refreshing change to go every year and recharge by simply getting away from the world (our phones don't work in most of the smaller communities) for a few days. If you are interested, I'll tell you some time about our last trip to Yakutat. It was awesome!