Best not to leave and apply from within the U.S., You will soon be able to submit your husband's "extreme hardship" waiver to an adjudicatory authority inside the U.S, hopefully get the waiver granted and only then leave for the immigrant visa processing at the U.S. consulate in your country of nationality. If you instead leave before getting married here and do it all from outside the country, you and your husband could be separated for a year or more, while you are waiting or the waiver to be adjudicated abroad.
Behar Intl. Counsel 619.234.5962 Kindly be advised that the answer above is only general in nature cannot be construed as legal advice, given that not enough facts are known. It is your responsibility to retain a lawyer to analyze the facts specific to your particular situation in order to give you specific advice. Specific answers will require cognizance of all pertinent facts about your case. Any answers offered on Avvo are of a general nature only, and are not meant to create an attorney-client relationship.
It does not matter where you get married. I respectfully disagree with the previous answer. If you leave the U.S. before you turn 18 1/2 you will not accrue the 180 days of unlawful presence that would trigger any bar from returning and you would not need to file any waiver. However, proving the validity of your marriage, given your age and the timing, could be very difficult. Consult with an immigration lawyer soon and before making any decisions.
I agree that leaving before 18 1/2 would stop you from accruing "unlawful presence.". Once you leave he can petition you for fiancé visa. A hardship waiver is extremely difficult and if it isn't granted you would be facing deportation. The best way for you to make a decision is to meet with an immigration attorney and go over all your facts.
Please be advised my answers to questions does not constitute legal advise and you should not rely on it, due to the fact that we have never met, I have not been aprised of the facts in you case nor have I reviewed any documents.