I have seen many Indian politicians visiting religious places of all the religions in India. In last few decades we have seen that they have been often criticized by culturally right semi-literate people.
I advice them to take out some time and read some history books on Indian culture right from 4000 BC to today. I bet they will come to know about great tradition of plural culture respected by then Samrat Ashoka and Akbar.
Now, let's come back to current year. I think it is not wrong on part of politician when he visits a religious place, but precaution should be taken by him in a diverse country like India. If you are visiting a temple then you should also treat Mosques and Churches with same parameter. Let me put forth some letter conversation between conservative Rajendra Prasad who was president in 1950's and liberal Nehru who was Indian prime minister at that time. Situation is Rajendra babu was invited for inauguration of restored Somnath Temple in Gujarat.
Nehru wrote to him -
‘I feel that it would be better if you did not preside over this function.’Rejendra babu in his speech there said -
‘I respect all religions and on occasion visit a church, a mosque, a dargah and a gurdwara.’
This should seal the debate. It is not that only Hindu politicians visit Mosques, if you google a little you will find that contemporary J & K CM Omar Abdullah used to visti visit temple in a state where Hindus are in minorities. One can wish to call it tokenism but I want to urge that since this tokenism reassures minority community that their rights would be upheld, I find it any time better than majoritarianism.
Also, there are some elements in India one comes from Hyderabad and another from Gujarat. You will not find them visiting religious places of other religion. I don't want to name them. If you are wise you know them. One last request keep your eyes open to differentiate between Secularism and pseudo-Secularism at the same time do differentiate between Nationalism and Religious Nationalism too.