In lighted situations: Wrap electrical tape around the base of the earbud and the wire, using a different color for each side.
I would suggest red for right just for the mnemonic device.
Taping is good practice, anyway, unless your wires are fabric-wrapped.
In dark situations: Put a drop of high-temperature glue - super glue is probably OK - on the outside stem or shell of one of the earbuds and let it dry completely.
You'll be able to feel the bump with your fingertip.
lifehacks.stackexchange.com/users/1377/Engineer Toast
A dot of red fingernail polish on the right earbud.
Red and Right begin with the same letter.
lifehacks.stackexchange.com/users/1847/dwilbank
You can make a simple knot on one of the earphone cable, so from know you'll always know which headphone is the left one, even without looking.
lifehacks.stackexchange.com/users/2272/kenorb
Wrap some tape around one of the cables.
Make it thick enough to feel or make a tab.
lifehacks.stackexchange.com/users/10/Adam Zuckerman
Most earphones have a long and short cable.
You could remember which way you wear them.
I know that my Sennheiser earphones are short on the left side and long on the right side.
I always put them on in the same way, the long wire goes behind my neck towards my right ear, whilst the left side can easily be inserted.
lifehacks.stackexchange.com/users/1826/CustomX
Hi I am using Samsung earphones and on the left earphone, there is a dot which can befelt in dark.
Also for Left earphone L is not carved in its carved out, which can be felt in dark along with a dot just below that.
Guess this solves the purpose.
lifehacks.stackexchange.com/users/24962/user24962
My solutions
In light: I took a permanent marker and covered the right earbud with one color (blue) and the left with another (red).
If you have earbuds with colors other than white, wrap paper and tape it around each earbud cable and then do the coloring.
In dark: I took some tape and made a little "flag" on the right earbud.
lifehacks.stackexchange.com/users/24902/Trooper Z
Usually the problem with earphones is that you don't know which goes to which ear. Of course there are some small markings (such as L or R), but who wants to read those every time when you want to use them (especially in some dark places).

Which method usually do you use to keep the track which one is which?
How to keep track of which earphone is left or right?
lifehacks.stackexchange.com
<headphones>
lifehacks.stackexchange.com/questions/3900
lifehacks.stackexchange.com/users/2272/kenorb
The simplest way to keep track of which earphone is left or right is probably to mark them differently, either by wrapping electrical tape around the base of the earbud and using a different colour for each side, or marking them with a marker or nail polish. Some brands actually have a long and a short cable to help identify whihc side is which. Alternatively, you could make a simple knot on one of the earphone cables to tell them apart without looking. The options are to place different coloured tape on each earphone and a drop of superglue on one for when you are in the dark, dab a dot of red nail polish on the right one, make a knot on the cable on one side, wrap tape around one of the cables, identify which cable is longer or colour the earphones with a marker pen.
Wrap different coloured tape around each earphone and, to identify in the dark, a drop of superglue on one of them. Dab a dot of red nail polish on the right onee. Make a knot on the cable on one side. Wrap tape around one of the cables. Most earphone have a long and a short cable to help you identify which side is which. Samsung earphones have a dot on the left earphone and an L. Colour the earphones with a marker pen and attach a 'flag' to the right one for the dark.