I'm another local yokel and would echo much of what's already been said. At various times I've owned and had my boat based in NE Harbor, SW Harbor, Camden, Belfast, and Bucks Harbor in S. Brooksville so am quite familiar with the Penobscot Bay area.
When you first arrive from the South, if you need boating equipment or parts, your choices within walking distance from shore is Hamilton Marine in Rockland, Hamilton Marine in Searsport (longish walk or call store for ride), West Marine and small Hamiltons Marine in SW Harbor.
Unless you need parts, and since you have limited time, I'd stay away from the western shore of Pen Bay, too many tourists in Camden and all of the Harbors on that side except Rockland or Camden's inner harbor tend to be rolly. Castine and Belfast are both nice little towns but both harbors have currents that make it uncomfortable when opposed by the wind direction. In Castine there's plenty of room to anchor across from the town to get out of the current. Belfast has probably the best boatyard (Frontstreet) for larger boats in the area.
My favorite harbor is where I currently keep my boat, Bucks Harbor on the western end of Eggemoggin Reach. It's very protected and well located for a sail in Pen Bay or to head eastward down the Reach or straight out to the islands around Deer Isle, Isle au Haut and the Fox Islands (North and Vinalhaven). There's a small general store that has an outstanding restaurant in the back of the same building a short walk from the marina dock or yacht club. Fuel and water available at Bucks Harbor Marine, water only at the yacht club dock. I also like sailing out around Deer Isle and North Haven and Vinalhaven. Arriving from the southwest, it's fun to pass between North Haven and Vinalhaven via the Fox Islands Thorofare as you proceed towards MDI. Anchor off the beach at Butter Island and go ashore and follow short path to the highest point and enjoy the view from granite bench. There's a fleet of schooners out of Camden and Rockland that regularly ply the waters between Pen Bay and MDI and anchor among the many islands in between. Quite a beautiful site to see them sailing or even just at anchor. Several of them have only a yawlboat for auxiliary power.
The MDI area is a great cruising area in itself so you really don't need to range too far afield if you plan to make SW Harbor your base. Bar Harbor is frequently rolly so best to limit a visit to during the day and spend the night somewhere else. Very nice little art gallery a short walk from dock at Islesford Dock (restaurant on dock but call for evening reservations). You can take your dinghy from SW Harbor on a nice day or take the "mothership" and call ahead to use one of the restaurants moorings or anchor. NE Harbor is very full, I prefer SW, take a 15 minute round trip cruise through the harbor in your boat and you've pretty much seen it. Somes Sound is pretty, especially if it's rough or foggy outside. Use a Hinckley mooring at Valley Cove. A nice day trip is to Frenchville on Long Island, or if you want to enjoy an actual SAND(!) beach and probably have it all to yourself, check out Marshall Island nearby. Swans Islands Burntcoat is also nearby and a nice harbor. A nice short sail east from SW Harbor is Hancock Point. Anchor on the east side and go ashore at dock and walk about 1/4 mile uphill along road for dinner at Crocker House, one of my very favorite restaurants/inns anywhere. Outstanding food and ambience but casual dress is OK! Call ahead for reservations.
Speaking of fog, we have lots of it but by late summer, less than in June. Also, the further east you go, the foggier is gets and the MDI area tends to be foggier than just ten or twenty miles further to the west. Sometimes it stays foggy for days. BUT, frequently, the warmth of a land mass will raise the air temp just enough to burn off the fog, so if you plan to sail in areas such as north of Bar Harbor or up Somes Sound or in Eggemoggin Reach or amongst the islands near Swans Island on these foggy days, you often can enjoy beautiful, sunny sailing conditions only a few miles from where those further from any land mass are completely closed in by thick fog. If you are approaching a harbor in extremely thick fog and wondering how in heck you'll even manage to find a dock or a particular mooring in less than 100' visibility, usually the fog will be much thinner once you enter a harbor due to it being surrounded by warmer land, so it's not as bad as it might seem from a few miles away.
Woodenboat School is located in Brooklin on the eastern end of Eggemoggin Reach. They host the Woodenboat Regatta around the first of August. If you're in the area, don't miss it! Between 75-100 wooden boats of all shapes and sizes racing, quite a show!
Anchor! Despite the rocky shorelines everywhere, almost every harbor bottom here is composed of a very thick clay/mud that is just about perfect for anchoring as long as you have a washdown pump to clean it off your chain. You can anchor almost anywhere and feel very secure. So, you aren't limited to harbors that have towns or other boats nearby. Also, the wind usually dies to almost nothing around dusk so unless there's a storm nearby, you can be pretty confident that even locations that seem exposed and windy at 3PM will be calm by nightfall.
Tides. Plan on 10'-12' everywhere so don't fall into the trap of assuming that just because you sailed through there yesterday, you can do it again today. Take it into account when figuring appropriate scope for anchoring. Nuff said on that!
Enjoy your visit, and welcome!