Breaking this into a few questions and answers:
> Does HmacSHA256 need a 256-bit key?
No, it would work with the string.getBytes in the same way that HmacSHA1 does. But using string.getBytes likely means you aren't taken advantage of the full key space since the string characters are probably ascii printable.
> Why change it to HmacSHA256?
If the key is larger than the block size of the hash function (160 bits for SHA1, 512 for HmacSHA256) then the using it has the key to the hash function first uses the hash function to take it down to size. This means the most entropy you can get out of your key is limited to the block size.
> Can we use the same key for encryption and hashing?
The general answer is not safely because it is possible there is an interaction between the encryption function and the HMAC function that can compromise the encryption: http://security.stackexchange.com/questions/37880/why-cant-i-use-the-same-key-for-encryption-and-mac
According to that post, AES for encryption and HmacSHA1 or HmacSHA256 for HMAC are believed to be generally be secure, but there's really no reason to take a chance.