When is surgery medically indicated for a hernia?

Pain. Usually when it hurts. Symptomatic hernias are usually repaired. Depending on their size and contents, asymptomatic may be watched.
When it bothers you. No one can predict future complication regarding a hernia so most doctors recommend elective intervention to avoid problems such as acute incarceration/strangulation. Elective hernia repair is usually simple with minimal risk, urgent hernia repair can be very involved - at times needing bowel resection. Urgent hernia surgery is also associated with higher recurrence rate.