What causes nails to pop on your roof?
There are multiple reasons this could be happening. The most common cause that I have come across was that the installation was incorrect. What does that mean you ask? Well your roof may have 4×8 plywood sheets as sheathing, or may have 1×6 planks installed, which is more common on older homes. Sheathing is the material the shingles will be secured to. When nails are installed to hold the shingles down, they should be of correct length. The nail should go through the shingle and the roof sheathing. If the nail does not have a good bite, it will pop. The roof goes through a heat and cool cycle on a daily basis as the suns ultraviolet rays beat down on your roof. The wood will expand and shrink with temperature. The result of improper nailing will force these nails upward against gravity forcefully, but slowly. It is a good idea that as your roof is being installed, you go up in the attic and check for 100% penetration of nails through the roof sheathing. If you go look in your attic and see no nails, you may want to get that roof installer back out to fix your roof that will most likely fail prematurely
Some nails will pop due to a soft spot in the sheathing. There are many ways to repair these nails. I will not go into repairs as there are multiple youtube videos available.