The Portland Head Light is located inside Fort Williams Park. The park is open from sunrise to sunset. They are very firm on these hours and will not open the gate early and will close the gate promptly at sunset. You will see photographers lined up in their cars outside the gate. There is a small lot in front of the lighthouse with less than 10 spaces available, so if you get there early enough, snag one of those spots. Otherwise, you'll have to park in the other lot. The other lot isn't that far of a walk, it'll just add a few minutes. Which normally isn't a big deal, but when you want that sweet light, minutes count.
I was shooting after the sun had set one evening and got locked in the park. Luckily, there was a huge tour bus and they opened the gate for them and let me and one other vehicle out. So, I would leave promptly as instructed.
The hours you are referring to is access to the Museum. But I assume you were asking about the opportunity to photograph the lighthouse???