Talk to your friend about it. Tell the person why you suspect he or she might be viewing porn and make it clear you are concerned and want to help. Tell the person that he or she is forgiven through Christ. Recommend this website. Offer to be an accountability partner. Offer to help the person find the right people that can help him or her (pastors, Christian counselors, etc). Pray for your friend often.

Do not minimize or rationalize the sin.  (If the person is in denial, help him or her understand how serious the sin is.)  On the other hand, do not condemn the person.  Do not act as if the sin is unforgiveable or worse than all other sins that God detests (pride, selfishness, etc.).