I would say it is possible, if the bearded dragon is carrying crypto or some other type of disease, possibly mites or RI... If you are thinking about putting them together I would say do not do it, because the corn snake will most likely try to eat the dragon.... But, if you have then separately then I don't see how your bearded dragon could have made your corn sick, unless of course you handled the snake right after the sick dragon.
It is hard to answer the question when there is no context to go off from...