Rats are omnivores just like ourselves, and are such food oriented animals that it seems unfair to provide a bland, homogenous diet such as pellets or nuggets. My approach is to try to feed a varied and healthy diet and assume that they'll pick up the nutrients they need from that.
A good rat muesli, or a muesli type rabbit mix, plus a little additional protein in the form of a small amount of dry dog food or leftover bones, should give them a good base diet. This can be supplemented with fruit and vegetables, a little fish oil, and calcium supplements, plus vitamin boosts such as Dr Squiggles Daily Essentials (although if they're not used to greens then it's best to increase the quantities gradually). If you're really keen, there's a book called 'The Scuttling Gourmet' by Alison Campbell, which is full of ideas for feeding your rats. A useful website is www.ratrations.com, which takes some of the guesswork out of providing a balanced diet.
Suitable vegetables are basically anything that a human can eat, with green veg such as curly kale and pak choi being especially good. Most fruits are appreciated, although those with stones should have the stone removed, and citrus should be avoided for male rats. If feeding banana, mind your fingers!
Although rats enjoy just about any food, they won't miss unhealthy treats if you don't lead them to expect it. They don't need crisps, pizza and chocolate!
One way to provide added enrichment for your rats is to scatter their dry food in their cage substrate so that they have to forage for it. This also helps to prevent the greediest rats from grabbing all of the best bits. It's no less hygienic than bowl feeding, given that rats commonly take their food into the litter tray to eat anyway.
Keeping your rats' weight at a sensible level is one of the best ways to keep them healthy, so if they're starting to become a little overweight cut back on the food and try to encourage more exercise.
Nuts in their shells are a wonderful combination of treat and toy. They're not something to be given too often due to their fat content, but will give your rats a challenge. Hazelnuts will last a minute or two, walnuts a little longer, and a brazil nut can take a sustained effort to break into.