During choosing electrode three things have to consider- Electrical conductivity, corrosion resistance, and cost. Products of electrolysis of water (H2 and O2) are very corrosive. So the electrode should be corrosion resistance and good conductor, and both these property is present in platinum. Thus to protect the electrode from corrosion inert material like platinum is taken.