1
We are נוהג in all places for many centuries not to get married between פסח and שבועות until the 33rd day of the עומר, because רבי עקיבא's תלמידים died during that brief period (though getting engaged and even קידושין is allowed because these are not עיקר שמחה according to the ריץ גיאת; additionally, if one does not be מקדש as soon as possible - there is then a possibility that someone else will take the opportunity to do so themselves instead) [1], to which end we try not to increase our joy then. There is no difference in this regard between נישואין של מצוה (for example, where one does not yet have children) vs. any other נישואין (for example, where someone already has children), because this is how they were נוהג: not to differentiate [2]. Remarrying one's own former spouse, however, is allowed, as the שמחה at such an occasion is relatively limited [3].
The historical background to this מנהג is as follows:
רבי עקיבא had 12,000 pairs of תלמידים between the two cities of גבת and Antipheras (these places may have been misidentified today - ed.), who all died of אסכרה in one period (namely, between פסח and שבועות) because they did not treat each other with the respect properly due to a תלמיד חכם. The world was then desolate of תורה until רבי עקיבא taught תורה to the scholars of the south. They were
רבי מאיר, רבי יהודה, רבי יוסי, רבי שמעון , and רבי אלעזר בן שמוע, who upheld תורה at that time [4].
Additionally, the primary season for the decrees in Germany and France in the days of our ancestors (i.e. the Crusades ר"ל) also took place during this season, as shown in the פיוטים (see here and here) that the קדמונים wrote to be said on these שבתות [5].
Now, if someone got married during this period anyway then we still don't punish them but לכתחלה we do not allow one to do so (so the גאונים paskened) [1].
From לג בעומר on, however, all of the above is מותר [6].
2
An unrelated reason given by רבינו ירוחם not to get married during this period is because these days are ימי דין on the grain, because, after all, the קרבן עומר is brought from barley. For this reason the מהריל did not shave until ערב שבועות [7].
Special thanks to Dr. Gabriel Wasserman for his assistance in locating piyyutim (many of which are no longer said in many communities) written in commemoration of the Crusades.
[1] טור ומחבר או"ח תצג:א
ועיין באר היטב שם ס"ק ב ובערוה"ש שם סעיף א
Today, however, that we do קידושין and נישואין together - it is still מותר to conclude a שידוך (i.e. get engaged) and even make a סעודה in honor of the occasion, because, after all, even a regular סעודת רשות is מותר. Dancing, however, even in honor of a special occasion, is still אסור (חק יעקב ס"ק ד;מ"א שם ס"ק א), and certainly playing musical instruments is אסור as well (ערוה"ש שם סעיף ב).
Additionally, we only don't punish one who got married between פסח and שבועות, because, ultimately, getting married is still a מצוה; one who gets a haircut, however, we do punish (באר היטב ס"ק ג).
[2] בח שם
[3] באר היטב שם ס"ק א בשם המהריקש ומ"ב שם ס"ק א וי"א שמי שהוא חולה וצריך למי שישמשנו הרי זה ג"כ מותר (עיין שערי תשובה שם ס"ק א). ובכהאי גוונא מותר לרקוד (אליה רבה שם אות ב)
[4] :יבמות סב
מהרשא explains that the reason they deserved to die for such a seemingly minor infraction (after all, disrespecting a תלמיד חכם is not typically a חיוב מיתה) is because the תורה is described as 'כי היא חייך', to which end one who disrespects the תורה and its scholars is deserving of מיתה (בידי שמים) because such a person is themselves disrespecting life itself.
Now, the reason they died specifically of אסכרה is because אסכרה (which, incidentally, is referred to as the most difficult death in :ברכות ח as referenced by פורת יוסף here) is a sign of לשון הרע which they evidently spoke about each other. Not only that, but the גמרא specifies that they died specifically between פסח and שבועות because the weather during that part of the year is the most pleasant and therefore most conducive to recovery from illness, and still רבי עקיבא's תלמידים died specifically then, to make obvious that the אסכרה plague was not seasonal but rather a form of מיתה בידי שמים, which they deserved for disrespecting each other.
See also כף החיים או"ח שם אות ה for a Kabbalistic explanation of how it came to be that רבי עקיבא's תלמידים were disrespectful of each other, the conclusion of which is that the purpose of the מנהגי אבלות is to distance ourselves from bad מדות and instead acquire in ourselves the מדות of love, humility and peace. To that end, שער הכוונות (דף א עג) warns one to be especially careful to love their peers with whom they learn תורה.
[5] ערוה"ש או"ח שם סעיף א
והנה מבואר בקישו"ע (צ:ד) ובעוד כמה פוסקים שאסור לספר דברים של צער בשבת וא"כ צ"ב איך תקנו לומר פיוטים אלו שכל עיקר ענינם הוא צער הגלות וסיפור התלאות שעברו על אבותינו וצ"ע
[6] רמא או"ח שם
This is on the assumption that one is נוהג התר to get a haircut from לג בעומר on, but according to those who are נוהג איסור against getting haircuts after לג בעומר - for them it is also אסור to get married after לג בעומר as well. According to that מנהג, however, one may then get married until ר"ח אייר just like they are allowed to get haircuts until ר"ח אייר.
[7] אשל אברהם או"ח שם וחק יעקב שם ס"ק ג