Late night snacking isn't necessarily bad for you unless it puts you over your calorie range for the day. Contrary to popular belief, it's a myth that eating after a certain time makes you turn it to fat.
When you work out is a matter of comfort and your schedule, not a "should" or "should not" - if working out later helps you avoid the snackies, that's fine. IF you would rather eat more at dinner, that's okay to. You have a range for a reason, use it! I plan for a post-dinner snack most nights. Works for me. :)