Host-associated bacterial communities vary extensively between individuals, but it can be very difficult to determine the sources of this heterogeneity. Here we demonstrate that stochastic bacterial community assembly in the C. elegans intestine is sufficient to produce strong inter-worm heterogeneity in community composition. When worms are fed with two neutrally-competing fluorescently labeled bacterial strains, we observe stochastically-driven bimodality in community composition, where approximately half of the worms are dominated by each bacterial strain. A simple model incorporating stochastic colonization suggests that heterogeneity between worms is driven by the low rate at which bacteria successfully establish new intestinal colonies. We can increase this rate experimentally by feeding worms at high bacterial density; in these conditions the bimodality disappears. These results demonstrate the potential importance of stochastic processes in bacterial community formation and suggest a role for C. elegans as a model system for ecology of host-associated communities.