That depends on your roof and home. Your solar contractor will be able to make that recommendation. Be sure to ask your solar contractor about how your new solar PV system will affect your roof warranty, as well as any leaks or damages that occur as a result of the solar PV system.
If your roof is older and in need of being replaced in the near future, you may want to defer installation of your solar PV system until that is completed.
Check your local city or county building department for applicable permit information.