Yes you can use hydrogen peroxide on a cold sore to help get rid of the cold sore and to prevent further infection of the cold sore.
You can also use Apple Cider Vinegar on cold sores which also kills the virus and bacteria and helps speed up the time it takes to get rid of the cold sore.
Tea Tree Oil is also good for treating cold sores and even toothpaste can get rid of cold sores or you can also soak a cotton ball with rubbing alcohol and it will too get rid of cold sores and prevent further infection.