Modular forms, the Shimura correspondence, and arithmetic applications