Is he really haveing nightmares or has he learned that screaming "nightmare" get him into mommys bed? That would be the first thing I'd figure out.
My son had nightmares, and we cut out food (sugery food mostly) 2 hours before bed. This helped great deal. He is 12 now and will turn down treats offered before bed, just to make sure he is not going to have bad dreams.'
Sleeping problems are hard to break, you have to be loving but firm about it and keep it up. If you think even for a min you will give in to his scream and crying...then dont even bother to start. It's heart breaking I know!
You'll have to pick a parenting tool you want to try, be it suppernanny's bedtime, or a book you like, We did "solve your childs sleep problems" with our first...stuck to it and it worked with in a week.
Oh and the best thing we did with our 4 kids was keep them in thier crib until they were 3, that helps a-lot! If he is not still in one, Go back to a crib if you can.
Best of luck.
Michelle