That may be because of bacterial infection or viral conjunctivitis. First, you can wear goggles when you are swimming. Through this way can you prevent from germ with pathogeny which may lead to conjunctivitis. Second, disinfectant in swimming pools also may stimulate eye conjunctiva. If necessary, you can drop eye drops into tears.
Your red eyes must be caused by the infection from the water in the swimming pool. I suggest you to wear the swimming goggles when swimming to avoid the infection. In addition, you must clean your eyes after swimming by using the clean water. Then, you'd better use the eyedrops to do the second clean for the eyes.
Swimming is great exercise. Swimming pools contain many chemicals and potential contaminants. Chlorine and other chemicals are added to pool water to control bacteria, while these chemicals also can irritate the eyes. Eye infections and inflammations are widespread among swimmers. So as a swimmer, you can do as following: 1) be careful, when swimming in public pools. Do not swim in a pool with leaf litter. Avoid swimming with large numbers of people. Stay out of swimming pools with small children. Wash before entering the water. Do not change diapers in swimming pools. 2) you can buy goggles for swimming. And you should make sure to keep them for a while. Do not touch the eyes before washing hands with soap. And then clean eyes with drops after swimming. 3)Slow the spread of eye infections with basic precautions. Eye infections, such as pink eye (conjunctivitis), can be transmitted through close contact with an afflicted individual. Stay home. Do not go to swimming pools or other public places if you have an eye infection.