It seems to be a light diffuser in/behind the LCD panel. This is not glued into place and thus able to move slightly, with some MacBooks moving more than others. Also temperature may be a reason for rattling becoming louder sometimes, while certain materials expand and the space that the diffuser has becomes larger (thermal expansion). I can't confirm nor deny whether the webcam module has also a role in this rattling sound, however when tilting and thus rattling the image in Photo Booth does not stutter. That would indicate the webcam module does not have a role in this and thus only caused by a certain part (diffuser!?) in the screen. As far as I understood this loose part is not harmful and relatively normal, but a quick visit to a Genius Bar is never a wrong decision if you're doubtful.
Video below shows the rattling sound this thread is about.
https://www.youtube.com/watch?v=HmL7KXCMfxU
Step 13 shows the diffuser.
[guide|9493]
Other threads on this topic.
https://www.reddit.com/r/apple/comments/3io5za/2015_13_rmbp_owners_does_your_computer_rattle/
https://www.reddit.com/r/apple/comments/5ewxmx/new_15_macbook_pro_is_making_a_rattling_noise/
https://linustechtips.com/main/topic/455781-2015-13-retina-macbook-pro-rattling-when-shaken/