They don't do much of anything, but on some vehicles they look ok or can be a styling bandaid. My cousin has an '04 Silverado with an '06 grille and the bug guard kind of fills the gap between the newer grille and the hood.
My Ram came with one from the factory. It does nothing for the windshield but it does protect the hood. I never get bug smears on the hood and if the number of little chips on the deflector are any indication it has protected the hood from rock chips too.
Defiantly recommend you get one.
I run one on my 1998 Ford Explorer. Great investment. I have had to replace it twice from impact that could have done some hood or worse windshield damage. I have PPF on one of my MINI's and has been there since about 2008. If 3m is used and the use of their thicker clear (very hard to apply) is used bugs and other impact material will not harm or discolor the coating. On my Mazda I have a hood grill cover that I wish I had installed much sooner because of how low the hood area is for getting impacts. I should have covered the front end when it was new. Now I need to repaint the complete front because of all the small chips.