Personally, I think that almost all of our dreams are just that - dreams.
However, as Sarah said, we have to be very careful because Satan is very tricky. I agree with Mary about reading Fr. Dubay’s book. He’s my favorite author. Very Catholic. Very readable.
That being said, yes, I do believe that God can come to us in a dream because it happened to me. I was going through a spiritual crisis. I didn’t dream of God; I believe He hid in one of the characters of my dream and the simple, little message He gave me (actually written down in a Christmas card in the dream) was exactly what I needed to hear at the time. I woke up immediately and just knew it was Him. (I’m not giving any other details because it was personal and I don’t want to be banned!)
I think that, if it happens, you just know that it’s Him. You know deep down inside. If you have any questions about if it was Him or not, or if the dream gives you a specific “revelation” or “mission”, then you have to find a good priest or spiritual director to talk with.
Even if you do receive a “revelation” of some sort, remember that the Lord very highly values obedience. So if a spiritual director tells you that it was just a regular dream, obey. If it is anything other, the Lord will come to you again, and you must go to your director again. Think of St. (Padre) Pio and the opposition he faced in his life on earth, and now he is a Saint!
*“I wish that my heart could beat, that I could live and breathe only for Jesus, I wish that my tongue could utter no other name than that of Jesus; that my eye could see only Jesus; that my pen could write only about Jesus, and that my thoughts could soar to nothing but Jesus. I have often wondered where on earth there might be something on which I could center my love. But neither on earth nor in heaven do I find any such thing but only my beloved Jesus… I am the fruit of your passion, Jesus, born of your wounds. O Jesus, seek me in love; I no longer possess anything; you have stolen my heart…” *- St. Gemma Galgani