If you are praying for someone and sense that guilt or sin is an obstacle, a good approach is to ask very discreetly and gently, “I sense that there may be something weighing on your conscience that is an obstacle to healing. Do you think that might be the case?” Allow the person complete freedom to decide whether and how much he wants to disclose. Never coerce or pry for information. If the person says no, then simply continue to pray for healing, and trust the Lord to do whatever interior work he needs to do in his timing. If the person says yes, then invite him to say a simple prayer of repentance (either out loud or silently, as appropriate) and to leave that sin at the foot of the cross. Encourage him to avail himself of the grace and power of the Sacrament of Reconcilation as soon as possible. Then pray for the physical healing. . . .
The bottom line is that we are not the ones to judge whether a physical ailment is related to personal sin. God alone is the judge. Even the afflicted person should not assune to judge himself (cf. 1 Cor 4:4). And whether the ailment is related to sin or not, God’s mercy abounds for both forgiveness and healing. God does not heal because we deserve it but simply because he loves us.