THE DREAM AT THE CAVE: Running away from his parents' funeral, young Bruce Wayne fell into a circular shaft leading to a cave, where he saw in vision hundreds of bats surrounding him and rising him above the darkness of the pit and back into the light. Bruce Wayne himself says in the movie that this dream propelled him into crime fighting, hoping to find the light... but it never happened. He became ruthless and, as Alfred tells him, cruel, almost a villain when the movie starts. The movie shows how his perceived imminent risk to Superman makes him willingly kill in cold blood... but in the last moment, Superman shows him a better path, a redemption for his trauma upon the death of his parents via Martha Kent's rescue. The concept that this dream originated through supernatural means is never addressed, but it could be interpreted that Superman's example and, ultimately, his sacrifice makes Batman finally see "the light" of justice, becoming a little more humane (as demonstrated by not branding Lex Luthor in his cell) and thus starting his mission in search of other meta-humans in company of Wonder Woman, in order to "be united". On the other hand, this dream-like scene takes iconography Christopher Nolan introduced into the Batman mythos in his Dark Knight Trilogy, but with a twist, thus making it a tribute to Nolan's trilogy and his character's contributions inside the DC Expanded Universe.
THE CREATURE IN THE TOMB: At some point of the movie, Bruce Wayne has a dream where he visits his parent's mausoleum and, while contemplating Martha Wayne's tombstone, a black liquid starts to pour from it. As he examines it, the tombstone bursts and a dark-skinned creature attacks him from inside. Wayne wakes up disturbed. Just like the Dream at the Cave, if this dream implies any supernatural element is not currently confirmed in the overall DC Expanded Universe, but it can be taken as Wayne's mind still trying to cope with his parent's death trauma. Furthermore, in an allegorical way, it could mean he is always subconsciously projecting his inner demons on his parents through the form of a humanized giant bat, thus not allowing him to get over it. Another way to look at it could be that somehow this dream is connected with the nightmare, the creature could be another vision of a para-demon or even a premonition/vision of the weight his mother's memories could make him realize Superman is not his enemy because, if he (Batman) lets Martha Kent die, the whole world will suffer the consequences.
THE KNIGHTMARE: Waiting for the long process of decoding the hacked copy of Lexcorp files, Bruce Wayne falls asleep in front of the computer. Then, he has a dream/vision of a dystopic future where the world is barren, civilization is destroyed and Superman is leading an army of both human soldiers and winged creatures while armed with a pistol. On the ground a large Omega symbol has been carved. While trying to take possession of a kryptonite sample, Batman is captured. Superman confronts Batman saying that he "let her die" and then kills him, presumably by ripping his heart out. Wayne appears again in the Batcave but a red-masked man appears from some sort of portal, wondering if he came "too early" and saying to Wayne that he was "right about him" (not entirely clear if he meant about the latent danger Superman might pose, Lex Luthor, Doomsday or someone else) but Lois Lane is the key to avoid such a future. Suddenly, Wayne "wakes up" wondering what has just happened. Elsewhere in the movie, Lex Luthor points to his father's apocalyptic painting in the wall and talks about "demons coming down from the sky" as a red herring, since evidently he was not refering to Superman (he always refers to him as a messianic figure or even "god") but to something else, as he left the painting upside down before he had been taken into custody. Note the close similarity between the creatures in Batman's nightmares and the figures in the painting.
All these elements heavily imply that Batman's vision was caused somehow by a future Flash coming from a possible timeline when an inter-dimensional warlord called Darkseid has taken control of the Earth and Superman is now under his command due to Lois Lane's death. The winged creatures are called Parademons and are Darkseid minions. In the last scene, when Batman confronts Luthor in his supermax cell, Luthor keeps calling out about demons from heaven to Batman, emphasizing that he succeeded in his plan to "kill god" so that Darkseid's arrival turns out in the super-villain's victory. While this movie presents dreams and nightmares as a new element to Batman's psychology and it's never clearly stated why or how Batman has such a vivid, detailed vision of this possible future, it certainly becomes the "heart wench" he mentions to Diana Prince, the reason for them both to start looking for metahumans after Superman's sacrifice and be united, thinking such hideous future has been avoided but Darkseid's intervention has not, setting up the story for The Justice League: Part One and since it involves time travel, possibly The Flash as well.