As a developer, every line of code must be written with security in mind. You must employ the concept of "defensive programming". Ensure every possible loophole is sealed before releasing your system. It's important to discuss security throughout the cycle of your system development, right from requirements gathering to software release.
However, I always make it clear to my clients that security of a system is as strong as the weakest point. As the developer, I can only do so much, but there are instances where I can't have control. Take for instance, a system administrators who are reckless with their passwords and allowing them to be copied and used by everyone. Or an admin who just got fired and they didn't remember to rid him/her off the system.
Security is a very long topic, and given the meager budgets allocated to systems development at times, it gets very difficult for developers to ensure all standards have been met.