Under the Mosaic Law even when Jesus walked the earth, Jewish men were expected to attend three feasts celebrated at the temple in Jerusalem—the Feasts of Passover (and Unleavened Bread), Pentecost (or Weeks), and Tabernacles (or Booths).
These were important as memorials of God's faithfulness to His people at pivotal points in their history. They were also events that held greater meaning and significance for the future of those who trust in the God of Israel—the Living God.
As with many events and miraculous signs in John's gospel, this event at the end of Chapter 2 was illustrative of the Lord's ministry on earth with eternal impact and significance.