It depends completely on city ordinances if it is illegal or legal to bike on the sidewalk. In some places, such as Fargo, ND, it is prohibited in certain marked areas yet perfectly fine in others.
As far as wearing a helmet. To my knowledge, you never "have" to wear a helmet. If you choose not to, enjoy your skull fracture and permanent brain damage.