We dream because our brain is organizing and sorting thoughts, memories, images, etc. while we sleep creating dreams. Just like you think about things when youre awake and picture things in your head, same thing happens when you have a dream.
no one could really tell why a person dreams but for me I dream because it's one way to escape reality and for a moment experienced the life I always wanted...and it's also one way to plan for the future
If you mean sleep dreaming, I always heard it was because our brains never stop, even when they are resting. You are always dreaming whether you remember it or not, because your brain is always working. So it's sort of the body's way of keeping the brain active while you are resting, and it just sort of flits through your subconscious and such.
At least I think, I haven't looked into that much.
http://m.youtube.com/watch?v=XB7HqZc2p2Y This is a really good video on dreaming. It basically says, dreams are the subconscious trying to teach us lessons, often using symbols and metaphors. . A good website for interpreting the metaphors and symbols of dreams is dreammoods.com (I think it's a female's website but still...)