Lewis never said. The illustrator in the original Alice In Wonderland put tobacco plants - you can tell by the flowers - next to the caterpillar. I don't think there was any intention to suggest anything else.
(What Disney may have intended to suggest - who knows. First ask why they made him blue...)