A hydrocele in adults  can form due to a scrotal injury or infection. Infections in the testicle or in the epididymitis lead to inflammation.