For prisoners they have two big "cases" that recognise human rights for these people.
The first was State of A.P. v. Challa Ramkrishna Reddy. The Supreme Court has emphasized that a prisoner, whether a convict, under-trial or detenu, does not cease to be a human being and, while lodged in jail, he enjoys all his fundamental rights guaranteed by the Constitution of India including the right to life guaranteed by the Constitution.
The second was T.V. Vatheeswaran v. State of Tamil Nadu. Despite Constitution of India does not expressly provide the provisions related to the prisoners’ rights but in the case of, it was held that the Articles 14, 19 and 21 are available to the prisoners as well as freemen. So "Prison walls do not keep out fundamental rights".
Look these articles: (http://lawmin.nic.in/olwing/coi/coi-english/coi-4March2016.pdf)
14. The State shall not deny to any person equality
before the law or the equal protection of the laws within
the territory of India.
19. (1) All citizens shall have the right—
(a) to freedom of speech and expression;
(b) to assemble peaceably and without arms;
(c) to form associations or unions
co-operative societies];
(d) to move freely throughout the territory of India;
(e) to reside and settle in any part of the territory
of India;
(g) to practise any profession, or to carry on any
occupation, trade or business.
21. No person shall be deprived of his life or personal
liberty except according to procedure established by law.
Even so, they have Prisoner’s Rights under the Prisons Act of 1894. This law mainly focus on reformation of prisoners in connection with the rights of prisoners:
Accommodation and sanitary conditions for prisoners
Provision for the shelter and safe custody of the excess number of prisoners who cannot be safely kept in any prison,
Provisions relating to the examination of prisoners by qualified Medical Officer,
Provisions relating to separation of prisoners, containing female and male prisoners, civil and criminal prisoners and convicted and undertrial prisoners,
Provisions relating to treatment of undertrials, civil prisoners, parole and temporary release of prisoners.
You can read more about here: https://www.legaldesire.com/rights-prisoners-indian-law/