No, playing RuneScape private servers isn't illegal, since those servers aren't connected to the official RuneScape in any way. They operate independently, so you're not infringing on the real game by using them.