For years people subscribed to the notion that eating at night meant the food was automatically converted directly into fat. Keeping it simple; your body is constatnly using energy and the current trend is that it really doesn't matter about timing....the emphasis is more about how much you eat overall. It's a matter of calories in vs. calories out. Like your car's gas tank: it doesn't matter at what hour you fill the tank, it still gets the same mpg.
....At the same time, it's suggested you eat well before your workouts and definitely after working-out as well. It's also important to have a good breakfast and many will suggest going lean on the carbs into the evening.
Fact is, you can find theory that supports each of these concepts....it ranges from "it doesn't matter when you eat" to "eat early, eat before & after workouts and go lean into the evening". You just have to decide what works best for you.
What you may find interesting is that the main benefit from subscribing to a strict "no eating after 6pm" routine is not so much the nutrient timing, but rather that it removes several hours of time when you may eat. What that means is that most people won't really eat extra food earlier in the day to offset what they won't be eating after the sun goes down, so your basically just eating less overall: the reduction in calories will cause you to lose weight, NOT the lack of food sitting in your tummy while you sleep! People think it's nutrient timing when it's actually just less time spent eating.
What tends to work best is regular small/medium meals throughout the day; your body burns calories 24/7....so you can fuel 24/7 as well. Much of what I've written can be argued, but it's a good basis to start with.