In fact, they are the same hashing algorithm: SHA2, just with two different digest sizes.
It is "cheaper" (faster) to generate SHA256 than SHA512. So from the security perspective a potential attacker will need more time to generate all possible SHA512 hashes to brute force a hashed password from your database.
So the one obvious disadvantage of SHA512 is performance, but in ~99.9% applications you wouldn't see a difference, because usually programs calculate just one hash at the time.
In this PDF document on page 3/11 you can find a time table how long it takes to generate hashes for many different hashing algorithms, just to let you rough understanding of differences between them. The document isn't brand new, so the number nowadays are smaller (due to the bigger computer power). But you will see that SHA512 consumes more time than SHA256 anyway.
EDIT: Just like colleagues said in the comments below: SHA hasn't made for password storage purpose and therefore it shouldn't be used for it.