If you smoke a joint and go to bed straight after, it is very unlikely you'll dream.

It is when you've stopped after smoking for a while you get these more vivid dreams for the first few days. Everyone will agree, so there is certainly a big connection.