The litter bird was an unseen, giant, flying, pterodactyl-like GELF creature. It had made its nest in a place where it could help keep the convicts of Justice World in line, and punish wrongdoers, since the convicts had been allowed to roam freely.
The gardens were within the "Justice Zone", where any negative or malicious action would be repeated upon the offender in kind - hence why the convicts had been allowed to roam freely. As Dave Lister and the Cat took a stroll in the botanical gardens, Lister struggled to explain to the Cat how the Justice Field worked. After finishing his can of Leopard Lager, Lister threw the empty can at a nearby bin, but it missed and landed on the ground next to it.
Since this was classed as littering, the litter bird swooped into action. After hearing the rustling of massive wings, Lister looked up too late to move. The bird unloading its droppings — a massive blob of red gunk — down on Lister's head.
Behind the scenes
The scene did not appear in the broadcast episode and is best described in the Series IV script book.
The scene was actually filmed in a London park, and included dropping gunge on Craig Charles, but effects for the scene were never completed and it was not included in the broadcast episode.
However, it can still be seen in the deleted scenes on the Series IV DVD. Nevertheless, the litter bird is still only heard, but not seen, in the deleted scene.