The short answer here is typically yes as long as you are prepared for the noise. This will depend on the type of work being carried out on your roof. There are fewer problems with this for roof repairs or restorations but it may be more disruptive with a reroof. Here are the main things that you will need to consider.
There are many roofers that can bring radios with them which they listen to while they do their work. Along with this there is quite a lot of noise generated by the work itself. The roofers often use power tools and machinery that is very loud and there is no way around this. This is particularly true for full reroofs where the old roof needs to be lifted off. The roofers will need to communicate with each other regardless of the type of work and this can also be disruptive.
A work site can be a very dangerous place. A lot of roofing work requires high risk work that may include the removal of existing roofing materials. There is also a lot of debris that comes off the roof during the cleaning process and even more so for roof replacements. In many states you need to have the required safety equipment and licence to be working or even in the area whilst these works are being performed.
Figure out how many days your roofing project is going to take and potentially look into a motel for a while the work is carried out. Or, you can have them do their work while you are doing work yourself during the day. Figure out a schedule that allows you to enjoy quiet time at home when you are carried out with your entire day. Generally, you are able to live at home while the roof is being worked on. Ask the roofers that you have hired to work on your home the things they recommend. Depending on the work required many will say it is fine to be home for the bulk of the work but may require you to leave during the day.