What is the contribution of the cockroach to the ecological environment?
Short answer
Cockroaches are an integral part of the food chain. 

Background
Cockroaches are an important source of food for a number of organisms, such as arthropods, birds, and mammals. As such, they are an important part of the food chain. Cockroaches also play an important role in nutrient recycling. Most species of cockroach are detritus feeders and with the help of endogenous cellulases play an important role in degrading plant material. Some species, such as Cryptocercus, feed directly on wood and play a major role in lignocellulose digestion in temperate forests.

Reference
 - Bell et al., Integr Comp Biol, 2008; 48(4): 541-3