European Health Insurance Cards (previously E111 cards) are valid within the European Economic Area (EEA) meaning they cover all 28 EU members as well as Norway, Lichtenstein and Iceland by default. Switzerland, whilst not being part of either the EU or the EEA, have a trade arrangement giving them access to the single market, and are covered by EHIC cards too.
In the event of a Brexit, the validity of EHIC cards will depend upon the situation Britain finds itself in following the negotiation period. EHIC cards would certainly not become useless on the 24th June, remaining valid at least until further arrangements are made and the exit negotiations are concluded.
Should Britain leave the EU but remain part of the EEA - which seems an increasingly likely scenario - EHIC cards would continue to be valid. If not, leave campaigners will point out that the UK has medical deals with countries such as Australia and Israel that allow free access to healthcare, and would suggest that a similar arrangement with the EU is perfectly achievable. Remember EHIC cards are as beneficial to EU citizens coming to the UK as they are to us on our holidays, it would be in the interest of both parties for the benefit to continue. As with all things in this referendum however, there can be no guarantees.