Yes you can leave the US without any problem, if it's not for a long-term relocation abroad that involves giving up your job in the US.
But if your husband is in the US, whether he can leave without jeopardizing the green card process is a more complicated matter, for which u'll have to provide more information about the situation and his immigration status in the US.