Hardy was selected as the Labour Party's prospective parliamentary candidate for Kingston upon Hull West and Hessle after the then-MP, Alan Johnson, announced his retirement just weeks before the general election in 2017.[9] She was one of 256 women candidates put forward by the Labour Party at that election,[10] and was elected on 9 June 2017, with a majority of 8,025.
Hardy was Joint Chair of the All Party Parliamentary Group on Endometriosis[12] and worked closely with the women's health charity Endometriosis UK to push for "menstrual wellbeing" to be included as part of the sex and relationship education in schools.[13] On 25 February 2019, the UK government announced that menstrual wellbeing would be included in the curriculum going forward.[14] She continues to work with local charity HEY Endo to enable better recognition of endometriosis in the workplace.[15]
Hardy was also the Vice Chair of the All Party Parliamentary Group on Mesh,[16] and campaigned to suspend the use of vaginal surgical mesh in the NHS. In October 2018, the National Institute for Health and Care Excellence (NICE) declared that vaginal mesh surgery should only be used as a "last resort" to treat pelvic organ prolapse and urinary incontinence.[17]
Hardy campaigned locally in her constituency to secure the funding for the A63 Castle Street development, prevent any further delays and ensure a bridge was built as soon as possible. Following delays to the project, building of the bridge started in October 2018,[18] and it opened to the public in March 2021.[19] Preparation for the A63 road development commenced in October 2020 with the exhumation of 19,000 bodies from the Trinity Burial Ground.[20]
Hardy also lobbied successfully to bring money to Hull for a new Children and Adolescent Mental Health Unit. The money was agreed by the Government in July 2018[21] and the project was finally completed in January 2020.[22]
In March 2021 Hardy resigned from her role as a Shadow Education Minister, being succeeded by Matt Western.[26] She cited an increase in constituency work due to the COVID-19 pandemic.[27]
Hardy campaigned for better flood prevention, protections and insurance, presenting a ten minute rule Bill, Flooding (Prevention and Insurance) on 16 November 2021,[28] referencing the 2007 floods which devastated parts of Hull and the East Riding.[29]
In the 4 July 2024 general election, she was elected as Member of Parliament for the constituency of Kingston upon Hull West and Haltemprice with a majority of 8,979 on a turnout of 52.1%.[31]