I'm not sure how they got there, but every window ledge at the top of Coit Tower had coins along the outside edge. The windows are closed and locked, so it's not a simple matter of sliding them out from within.
(Click the image to view a smaller version.)