Dreams are the mind's method of 'sorting' information it has received, and assessing issues which are being dealt with by the subconcious. Nightmares and disturbing dreams often indiciate an underlying worry or stress, so check if there are any issues that are troubling you, even if they are in the 'back' of your mind most of the time - these are the times that bad dreams can crop up. Otherwise, make sure you get proper restful sleep, and try to relax at least an hour before you go to bed.
There are chemical reasons for nightmares also: avoid caffeine and cheese in the afternoon/evening as these apparently trigger nightmares and poor sleep in general. Also smoking patches - i personally had problems with nightmares when using these. Finally there is a chemical in lettuce which is supposed to assist sleeping so a lettuce sarnie last thing at night will help. (along with a hot milky drink - you should then sleep like a baby)
one close to my heart today as woke up feeling I had run marathon and fought for my life. Awful dreams. Then I realised a lot of the "action" reflected a computer game I was playing with my grandson yesterday. It was Monsters Inc, so I hate to think what one of the more violent games would do!