Yes. Planets are illuminated by the sun's rays, so they will cast shadows even if nothing is behind them. (This may remind you about the tree falling in the forest without anyone around to hear it...) This is apparent when the Earth or its moon are positioned in such a way that one of them intercepts the shadow of the other, making it visible. This is called an eclipse.
Work Step by Step
This is discussed on pages 493-495.