Their niche is at the beginning of the food chain, they use the suns energy to create their food, and so their role in a food chain is to provide the first rung of energy for the first consumers.
Didn't find the answer you were looking for?