They are for sorting & organizing Pokemon and serve no purpose other than that reason.
A marking tool was introduced in the Generation III games, with Lanette's Pokémon Storage System. This tool helps the player to organize their Pokémon within the boxes, but is not necessary for game play.
http://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_Storage_System#Markings
So to answer the question, no, they don't have any plot-necessary purpose.