Sir, I am 25. I have hydrocele problem for the past few years and I am actually afraid of surgery because I don't know whether it will affect my married life or not. What should I do?

Probably not. Repair of a hydrocele should not cause a problem with sexual performance. Your surgeon should be able to give a clear idea of the risks and benefits of surgery.
It shouldnt. A hydrocelectomy is a relatively benign and common procedure that is performed as an outpatient surgery. It should not affect your "functioning" long term. Risks of surgery include bleeding, infection, and damage to structures nearby the testicle.
It shouldnt. A hydrocelectomy is a relatively benign and common procedure that is performed as an outpatient surgery. It should not affect your "functioning" long term. Risks of surgery include bleeding, infection, and damage to structures nearby the testicle.