The rush-hour(s) commute can be brutal. Depending on the final destination, I'd plan on at least an hour. If you end up working for a company that allows you to move your work hours to non-standard times you can cut your commute time in half.
There are also some mass-transit options available: train service that connects to the Boston subway system, private bus companies, and also Park & Ride lots where you can share your misery with people you've never met before. Check out MBTA and SmarTraveller for some more information.
But keep in mind that living in NH and working in MA is bad for the budget. You get to pay the high property taxes that fund NH services (mostly schools) and the ~%6 MA income tax.