Here's a simple trick for developing healthy eating habits: think of your diet as a daily checklist of healthy food you have to eat before you can eat anything else.
It's difficult to change unhealthy eating habits because resisting food requires a lot of willpower. The checklist helps by shifting your mindset from one of total restriction ("I can't eat chocolate today") to one of delayed gratification ("I can't eat chocolate until I eat all my veggies"), which is easier to follow.
The checklist also requires you to eat foods with a lot of fiber, meaning you'll often be too full to cheat at the end of the day; it requires creating a food list, which tends to help with meal planning and logistics; it forces you to eat healthy at the beginning of the day, which will make you feel so good that it's less likely you'll want to ruin that feeling later in the day; and it uses gamification mechanics--checking items off a list is fun and addictive.
Of course, this won't work every day. But the point is to reshape your most common eating habits, which will still probably happen if you follow the checklist most days.