Diatoms appear when there's not enough bacterial activity in your tank/filter, rule out silica, it's only a myth, on the other hand moss is a dirt trap, vacuum it or trim it at every weekly water change. Shrimps can clear it for you if you have enough.
Mike