Other Answers have gone over the how by 1997 The House of Lords had been purely advisory. They don't really deal with why exactly 1997 was the time for the house of lords was reformed. Labour has always harboured ideological hostility to the house of lords as a socialist party a hereditary aristocratic legislature is unlikely to be friendly.
Previous Labour Prime Minister however found that the political capital required to abolish the house of lords too high, and given that they were limited by the Salisbury Convention from voting against any policy labour placed on it's manifesto that the issue could be ignored. Others became active particpiants in the system countinung a long-practice of giving out lordships to friends and political allies of the prime minister(Legendary Labour Prime Minister Clement Atlee was awarded a hereditary peerage and his grandson still sit's in the house of lords albeit as a conserative).
Despite this some reforms were attempted but disagreements about how far they should go sunk many affects, Harold Wilson's attempt to abolish the voting rights of hereditayr peers was stymided by an alliance of Micheal Foot a left-wing future labour leader who wanted complete abolition and Enoch Powell A far-right traditionalist who wished for no reform.
After the Fall of James Callaghan Government by a single vote in 1979 and the resulting election, the labour party would enter a period knows as it's "wilderness years" and would not re-enter goverment until 1997. The conservative party during this time period was headed by Magaraet Thatcher and Later John Major, who despite their less aristocratic pedigree than a typical Tory did not support reform of the house of lords. Labour during this time led at firstby the same Micheal Foot who had defeated Harold Wilson's attempt at reform during, promised to abolish the house in their manifesto(nicknamed the longest suicide note in history due to the poor election results that followed) in package including several other left-wing politics that proved to be electorally disastourst. An Ideological split that involved the departure of several pro-european right leaning members to then SDP/Liberal Alliance(now known as the liberal democrat) along with an economic boom kept the party out of power and their 1987 manifesto did not mention the house of lords once.
The vast majority of hereditary house of lord members in this time period were mostly conservatives with number of Liberal Lords outnumbering those affiliated with the labour party meaning that their agenda faced little resistance in the house of lords. This ratio is still preserved today in the distribution of hereditary house of lord seats where 42 lords are elected by the Conservative party, 3 lords by the Liberal Democrats and just 2 lords by the Labour Party. This mean little trouble would come from the house of lords to the conservative party who naturally viewed reform of this house as an unneeded expenditure of political capital that would go against the parties traditional values.
In 1997 Tony Blair led Labour back into power in one of the parties largest landslides winning a majority winning 418 seats to the conservatives 165. On the back of this was a manifesto promise "The House of Lords must be reformed. As an initial, self-contained reform, not dependent on further reform in the future, the right of hereditary Peers to sit and vote in the House of Lords will be ended by statute.". Important as given the Salbisury convention, the house of lords would be duty-bound to vote for the reform. This would also have the convient effect of making it less likley for the house of lords to be able to obstruct his governments policies which given his large commons majority could only face resistance in their house. In particular the house of lords had reaptedly voted against the goverments bill regarding the introduction of elections to european parliament. Blair Initially proposed abolition of the hereditary peers as the first-step towards a broader reform of the house of lords.
William Hauge the conservative oppostion leader at the time opposed the reform claiming it would wipe out any oppostion to the goverment and that Blair was being vague about what exactly the future reforms would be. In 1998 during the Annual Queen's speach House of lords reform was mentioned as one of the items on the goverments agenda. It faced immeditate oppostion from conservatives in the commons, and many lords threatened to filibuster the bill by obstructing normal business unless the bill was withdrawn. To avoid this waste of political Capital, Blair had come to a compromise with the Tory house of Lords Leader(The current Marquess of Salisbury, then Viscount Cranborne, Robert Michael James Gascoyne-Cecil for the more republican among us) where 100 hereditary peers would be allowed to stay. In response William Hauge Sacked him from his role but it was too late to avoid the compromise bill being passed. This was intended to be an interim compromise until further reform could be conducted, but due to political reasons out of the scope of this subreddit none of the future reform attempts have been able to pass mostly due to disagreements about the shape of these reforms.
Public Reaction was rather limited, Labour maintined their large majority in the following election with the conservatives not showing any willingness to spend the political capital that would be required to restore the hereditary lords. During the 2001 Election, William Hauge ran on completing the reform through a "requiring new members to be approved by an independent appointments commission" and promised to "set up a Joint Committee of both Houses of Parliament in order to seek consensus on lasting reform in the House of Lords" but otherwise didn't run on restoring hereditary lords instead running mainly on oppostion to immigration.
Reform Attempts were made later by Blair and during the Coalition Government to a more permanent change to the House of Lords.
Notes: If you have time and want to learn more about the debate regarding abolishing the hosue of lords it might do you well to read the parliamentary transcripts from the time with the debate.
http://hansard.millbanksystems.com/lords/1998/oct/14/house-of-lords-reform