You might still like him.
Good question. I went through this a month ago. I had a dream them my ex fiancee and I got back together and I was so happy when I woke up. Then reality hit and I discovered it was just a dream. Maybe you still like him or maybe he is thinking about you. Wish I had the answer myself. :)
I also dream about my ex boyfriend even though I'm married now. Its not that I still romantically like him or whatever. We actually remained good friends after we broke up but after some years, we kinda just drifted away. You know, we just stopped communicating. Plus there came a time when I deleted my facebook account (deleted all my photos) and I detached myself from my long time friends (unfriended everybody LOL). He's also happily married now, I know that at least and thats another reason why i dont want to just show up again even to say hi.
So I think, I dream of him because I really want to be friends with him again but at the same time I believe we should just remain like this. Maybe, if I happen to see him again, I guess that would be a good time to say "hey whats up?its been forever..how have you been?". :D