A great place to start is "Applied Cryptography" by Bruce Schneier.
http://www.schneier.com/book-applied.html
Edit: Note, this really barely scratches the surface for building secure software. AC says how to apply cryptographic primitives correctly. It won't teach you how to avoid vulnerabilities specific to particular application domains (like CSS, SQL injection, etc...).