Lag Ba’Omer is generally explained as marking the end of the pestilence which befell the students of Rabbi Akiva in the 2nd century and affected the military revolt against the Romans. Other explanations include the fact that this date is more or less the midpoint between Pesach and Shavu’ot.
In Biblical times both festivals required a pilgrimage to Jerusalem and entailed considerable effort on the part of the pilgrims in an age when travel was much more onerous than today. After Pesach, people who had been to Jerusalem for the holyday were so heavily involved in their normal agricultural work that they might have neglected to get ready and embark on the next pilgrimage. From Lag Ba’Omer onwards, however, their priority had to be the celebration of Shavu’ot.
There were two ways of marking the date – reluctant acceptance of the duty to return to Jerusalem, and excited anticipation of the forthcoming yom-tov. Tradition chose the second approach, and though the new journey, so close to the first, was a strain, the pilgrims thanked God for the opportunity of being present in the sanctuary once again.