There is nothing in the electrical codes that prohibits running appliances on the same circuit. This is normally done to prevent overloading of circuits, which can cause tripping of breakers or worse. The breaker size determines how many amps it will supply for appliances. Anything with an electric motor draws more amps than anything else. If you have a 15 amp breaker supplying power to your dishwasher and garbage disposal, then no problem. But if you are using 10amps on one circuit you might want to think about adding another circuit if there are other appliances you would like to run at the same time, such as kitchen lighting or a fridge/freezer combo
The exception does exist when the dishwasher has its own dedicated circuit. The garbage disposal, by definition, is always on. By dedicating a circuit to the dishwasher you would be freeing up the other circuits for use with other appliances.
If you have many small things on one breaker it can cause problems – but if they are not running at the same time everything should be fine.