I have had a few friends who don't smoke weed anymore that they thought they made better beats while high (just like you think you can drive better while drunk) They say it's not that you can make better beats, it's that you "feel" the music more when your under the influence. In the end, the marijuana is inhibiting your brain and this can have a negative effect.
In my opinion using weed every once and awhile and making a beat is fine, but all the time is a bad idea. Your putting your vices and passion in the same basket.
All in all, music is a drug. Use it