I agree that dinner is important for your information gathering, and is only mandatory if the program states so. While dinner is rarely an event that will improve your final rank on the match list, you can damage your chances by acting inappropriately (drinking too much, speaking poorly about other programs or generally acting foolish). Residents primarily want to see that you have a reasonable personality and you will be pleasent to work with.
Do not mislead yourself, however, and think that the PD / faculty are oblivious to the goings-on at dinner. Erratic behavior will be noted and passed along accordingly.
Just be polite, grateful for the meal and the residents' time, and positive. Also, have a glass of wine if appropriate and try to relax.