The future is known only to Allah, but in His infinite wisdom, He allows some of His servants to see some future events.
True dreams happen to believer and unbeliever, pious and impious.
Furthermore, there are other means such as intuition, inspiration, and discernment. Correctness of its interpretation. The Christians and Jews speculate concerning future events and calamities more than any other religion. Some Muslims have also engaged in this since early times. Their sources for this study were their Holy Books and their glosses and commentaries, especially those using symbolism and numerology.