Barberry is pretty tough and hardy, you likely won't kill it no matter when you prune.
May or maybe June for you in Massachussetts is a good time - after the first flush of spring growth which will be long and leggy. But you can prune again in the fall.
Be sure to prune it in a slightly cone shape, narrower at the top, wider at the bottom. Otherwise, the bottom doesn't get sun and it tends to die out at the bottom.
And wear long sleeves and bring a plastic sheet to put the trimmings on. The thorns are nasty and if you leave any of the trimmed branches behind the thorns are wicked to step on barefoot-- trust me, I learned that one the hard way!