Protein is very good for brain function. Fish and meat are the best sources of protein. Eggs are brilliant too, as are nuts. Dairy produce and beans and pulses have protein in them too.
Fluctuations in blood sugar is another thing that can cause concentration difficulties and memory problems. Blood sugar fluctuations can be caused by eating too much refined sugar (e.g. sweets and chocolate), because refined sugar makes your blood sugar rise and then suddently fall. Complex carbohydrates (wholegrain bread, wheat pasta, cereal which isn't too sugary, rice, potatoes) are good sources of energy which won't make your blood sugar crash like sweets will.
Make sure you're eating regularly (i.e. breakfast, lunch, dinner and a snack in between). Skipping meals is another reason that our concentration can go.
Make sure you're not drinking too much coffee/energy drinks/Coke too! A little bit can make you feel like you can concentrate more, but too much can make your head race and you can't concentrate at all.
Also, make sure you're getting enough sleep.