Sounds like there is a problem in the car's security system; or possibly a bad ground connection for that system. There should be a grounding wire that connects from the engine to the firewall, and/or a second wire from the battery ground cable that goes to a bolt in the fender well. If these wires are missing, it could cause this type of problem. If you can disable the security system, see whether that fixes the starting problem.
Another possibility is that the neutral safety switch is either defective, or needs adjustment. When the car won't start, try putting the shift lever in neutral instead of Park; and see if it will then start. If that makes it start; the problem is in the neutral safety switch.
If neither of these measures help, then I would suspect a bad starter solenoid, and would replace the starter (since the solenoid is built into the starter).
I hope this helps!!!