How can I secure a loose iron railing on a concrete step?
Remove the railing completely. Use a hammer drill or chisel to further loosen the material around the posts of necessary. 
Clean out the holes. All loose material and old anchoring cement should be removed with a vacuum or compressed air. 
Assess the condition of the railing. Often rust will weaken the bases of the posts. You may be able to cut the bad part away, removing an equal portion of each post. Obviously this lowers the railing, so determine whether it's an option in your case. You may also want to repaint it at this time. Modern spray paints are very good and often don't require much prep work other than cleaning.
Mix and apply anchoring cement (for example) to the holes according to the directions on the package, and set the railing in place. 
Temporarily brace the railing plumb using rope, poles, etc., while the cement cures. 


Optionally apply a sand/epoxy mix over the anchoring cement to give it a coordinating appearance and prevent degradation by weather. Over time rain and wind will wear it away as it's relatively soft. 

Obviously this repair is only as good as the condition of the stairs. If the crack we see is indicative of the shape the rest of the stairs are in, you may need to have them removed and re-poured.