If you have an older style single lever shower handle, it's possible that the diverter has become loose and is no longer functioning. You can re-attach it with a pair of pliers (usually channel lock pliers work best) by squeezing the two levers together. This will lock the diverter back into place.
You can replace it: The handle and trim for the tub/shower controls can also usually be replaced without redoing any plumbing by using a universal replacement kit (available for most brands at home centers and plumbing supply stores). ... Turn off the water supply, then remove the shower handle and trim